# HG changeset patch # User koda # Date 1339370037 -7200 # Node ID b554726ff4680ae3949ef46982c15aefc3d998be # Parent dfe678f129e4bab45d1d3f72d8532d6c685162fb uniform NOPNG and NOSERVER cmake symbols diff -r dfe678f129e4 -r b554726ff468 CMakeLists.txt --- a/CMakeLists.txt Mon Jun 11 00:03:04 2012 +0200 +++ b/CMakeLists.txt Mon Jun 11 01:13:57 2012 +0200 @@ -47,9 +47,6 @@ #set some safe values -IF(NOT WITH_SERVER) - SET(WITH_SERVER 0) -ENDIF(NOT WITH_SERVER) IF(NOT BUILD_ENGINE_LIBRARY) SET(BUILD_ENGINE_LIBRARY 0) ENDIF(NOT BUILD_ENGINE_LIBRARY) @@ -183,7 +180,7 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -if(WITH_SERVER) +if(NOT NOSERVER) if(GHC) set(ghc_executable ${GHC}) else() @@ -194,27 +191,33 @@ set(HAVE_NETSERVER true) add_subdirectory(gameServer) else() - message(STATUS "No GHC executable found, server will *not* be built") + message(STATUS "No GHC executable found, server will not be built") set(HAVE_NETSERVER false) endif() -else(WITH_SERVER) +else() + message(STATUS "Server will not be built per user request") set(HAVE_NETSERVER false) -endif(WITH_SERVER) +endif() find_package(Lua) -if(NOT ${LUA_FOUND}) - message(STATUS "Lua library not found, building bundled dependency") +if(${LUA_FOUND}) + message(STATUS "Lua library is present on your system (${LUA_DEFAULT})") +else() + message(STATUS "Lua library not found, building bundled dependency") add_subdirectory(misc/liblua) - #link with liblua.a (which requires system readline) + #linking with liblua.a requires system readline -- this works everywhere, right? set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags}) endif() + add_subdirectory(hedgewars) + #run cmake -DANDROID=1 to enable this if(ANDROID) add_subdirectory(project_files/Android-build) endif() + if(NOT (BUILD_ENGINE_LIBRARY OR ANDROID)) add_subdirectory(bin) add_subdirectory(misc/quazip) diff -r dfe678f129e4 -r b554726ff468 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Mon Jun 11 00:03:04 2012 +0200 +++ b/hedgewars/CMakeLists.txt Mon Jun 11 01:13:57 2012 +0200 @@ -171,13 +171,15 @@ if(${PNG_FOUND}) message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})") set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags}) - if(APPLE) # need to explictly link with the static lib + if(APPLE) # need to explictly link with the static lib -- maybe windows too? string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}") set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags}) endif() else() message(STATUS "PNG library not found, switching to screenshots in BMP format") endif() +else() + message(STATUS "PNG screenshots disabled per user request, using BMP format") endif() set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})