consistent cmake checks
authorkoda
Wed, 08 Jan 2014 23:29:30 +0100
changeset 9961 c18c66d621e5
parent 9959 1a42d36f346a
child 9963 9e75dbffec81
consistent cmake checks
CMakeLists.txt
QTfrontend/CMakeLists.txt
hedgewars/CMakeLists.txt
tools/CMakeLists.txt
--- a/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
+++ b/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
@@ -114,7 +114,7 @@
 
 
 #lua discovery
-if (${LUA_SYSTEM})
+if (LUA_SYSTEM)
     if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
         find_package(Lua)
     endif()
@@ -137,7 +137,7 @@
 
 
 #physfs discovery
-if (${PHYSFS_SYSTEM})
+if (PHYSFS_SYSTEM)
     if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
         find_package(PhysFS)
     endif()
--- a/QTfrontend/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
+++ b/QTfrontend/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
@@ -152,7 +152,7 @@
 
 set(hwfr_rez hedgewars.qrc)
 
-if(${BUILD_ENGINE_LIBRARY})
+if(BUILD_ENGINE_LIBRARY)
     add_definitions(-DHWLIBRARY=1)
     set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
     list(APPEND HW_LINK_LIBS ${hwlibname})
--- a/hedgewars/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
+++ b/hedgewars/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
@@ -106,7 +106,7 @@
 add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}")
 
 #DEPENDECIES AND EXECUTABLES SECTION
-if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE)
+if(APPLE AND (NOT BUILD_ENGINE_LIBRARY))
     #on OSX we need to provide the SDL_main() function when building as executable
     add_subdirectory(sdlmain)
     list(APPEND HW_LINK_LIBS SDLmain)
--- a/tools/CMakeLists.txt	Wed Jan 08 19:19:09 2014 +0100
+++ b/tools/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
@@ -17,7 +17,7 @@
     if(NOT NOAUTOUPDATE)
         find_package(Sparkle) #needed for SPARKLE_FOUND variable
         #needed because the 'if' clause in the script prints silly policy warnings
-        if(${SPARKLE_FOUND})
+        if(SPARKLE_FOUND)
             set(SPARKLE_FOUND 1)
         else()
             set(SPARKLE_FOUND 0)