drop extra spaces from a few CMakeLists.txt files
authorkoda
Wed, 08 Jan 2014 23:39:43 +0100
changeset 9963 9e75dbffec81
parent 9961 c18c66d621e5
child 9965 7ced30acf533
drop extra spaces from a few CMakeLists.txt files
CMakeLists.txt
hedgewars/CMakeLists.txt
project_files/Android-build/CMakeLists.txt
tools/CMakeLists.txt
--- a/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
+++ b/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
@@ -58,15 +58,16 @@
 
 
 #when build type is not specified, assume Debug/Release according to build version information
-if (CMAKE_BUILD_TYPE)
-    string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
-    if ( NOT( (CMAKE_BUILD_TYPE MATCHES "RELEASE") OR (CMAKE_BUILD_TYPE MATCHES "DEBUG") ) )
-        set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
-        message (STATUS "Unknown build type, using default (${default_build_type})")
-    endif ()
-else (CMAKE_BUILD_TYPE)
-    set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
-endif (CMAKE_BUILD_TYPE)
+if(CMAKE_BUILD_TYPE)
+    string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
+    if(NOT((CMAKE_BUILD_TYPE MATCHES "RELEASE") OR
+           (CMAKE_BUILD_TYPE MATCHES "DEBUG")))
+        set(CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
+        message(STATUS "Unknown build type, using default (${default_build_type})")
+    endif()
+else(CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
+endif(CMAKE_BUILD_TYPE)
 
 
 #perform safe check that enable/disable compilation features
@@ -81,7 +82,7 @@
 add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0")
 
 #CMake adds a lot of additional configuration flags, so let's clear them up
-if(${MINIMAL_FLAGS})
+if(MINIMAL_FLAGS)
     unset(CMAKE_C_FLAGS_RELEASE)
     unset(CMAKE_C_FLAGS_DEBUG)
     unset(CMAKE_CXX_FLAGS_RELEASE)
@@ -94,7 +95,7 @@
     if(${CMAKE_VERSION} VERSION_GREATER 2.6)
         separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
     else()
-        message(${WARNING} "GHFLAGS are available only when using CMake >= 2.8")
+        message("*** GHFLAGS are available only when using CMake >= 2.8 ***")
     endif()
 endif()
 
@@ -114,12 +115,12 @@
 
 
 #lua discovery
-if (LUA_SYSTEM)
-    if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
+if(LUA_SYSTEM)
+    if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
         find_package(Lua)
     endif()
 
-    if (LUA_LIBRARY AND LUA_INCLUDE_DIR)
+    if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
         set(LUA_FOUND TRUE)
         #use an IMPORTED tharget so that we can just use 'lua' to link
         add_library(lua UNKNOWN IMPORTED)
@@ -128,7 +129,7 @@
         message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
     endif()
 else()
-    if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
+    if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
         message(STATUS "LUA will be provided by the bundled sources")
     endif()
     set(lua_output_name "hwlua")
@@ -137,8 +138,8 @@
 
 
 #physfs discovery
-if (PHYSFS_SYSTEM)
-    if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+if(PHYSFS_SYSTEM)
+    if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
         find_package(PhysFS)
     endif()
 
@@ -152,13 +153,13 @@
         string(REGEX MATCH "([0-9]+)" physfs_patchversion "${physfs_patchversion}")
         set(physfs_detected_ver "${physfs_majorversion}.${physfs_minorversion}.${physfs_patchversion}")
 
-        if (physfs_detected_ver VERSION_LESS "2.1.0")
+        if(physfs_detected_ver VERSION_LESS "2.1.0")
             message(FATAL_ERROR "PhysFS version is too old (dected ${physfs_detected_ver}, required 2.1.0)")
             set(physfs_too_old true)
         endif()
     endif()
 
-    if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+    if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
         message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
     else()
         #use an IMPORTED tharget so that we can just use 'physfs' to link
@@ -166,7 +167,7 @@
         set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
     endif()
 else()
-    if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+    if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
         message(STATUS "PhysFS will be provided by the bundled sources")
     endif()
     set(physfs_output_name "hwphysfs")
--- a/hedgewars/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
+++ b/hedgewars/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
@@ -94,8 +94,8 @@
     )
 
 
-if (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.2 OR # older versions are just ancient
-    (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.6 AND APPLE)) # because of 64bit and opengl bindings
+if(${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.2 OR # older versions are just ancient
+   (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.6 AND APPLE)) # because of 64bit and opengl bindings
     message(FATAL_ERROR "Your FreePascal installation is too old (fpc ${CMAKE_Pascal_COMPILER_VERSION})!")
 elseif(CMAKE_Pascal_COMPILER_VERSION VERSION_GREATER 2.4)
     #enable INLINE only with a recent version of fpc
--- a/project_files/Android-build/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
+++ b/project_files/Android-build/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
@@ -26,8 +26,8 @@
 endif()
 
 if(IS_DIRECTORY "${ANDROID_NDK}")
-    message(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK}) 
-else ()
+    message(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK})
+else()
     message(FATAL_ERROR "Couldn't detect the Android NDK directory")
 endif()
 
@@ -39,35 +39,35 @@
 endif()
 
 if(IS_DIRECTORY "${ANDROID_NDK_TOOLCHAINDIR}")
-    message(STATUS "Detected the Android NDK toolchain at: ${ANDROID_NDK_TOOLCHAINDIR}") 
-else ()
+    message(STATUS "Detected the Android NDK toolchain at: ${ANDROID_NDK_TOOLCHAINDIR}")
+else()
     message(FATAL_ERROR "Couldn't detect the Android NDK toolchain directory: ${ANDROID_NDK_TOOLCHAINDIR}")
 endif()
 
-if(NOT ANDROID_SDK)#Check if its defined at the cmdline
+if(NOT ANDROID_SDK) #Check if its defined at the cmdline
     find_program(ANDROID_SDK adb) #assume they've added platform-tools to their path
     get_filename_component(ANDROID_SDK "${ANDROID_SDK}" PATH)
     get_filename_component(ANDROID_SDK "${ANDROID_SDK}" PATH)
     set(ANDROID_SDK "${ANDROID_SDK}" CACHE PATH "Path to the android sdk" FORCE)
 endif()
 
-if( IS_DIRECTORY "${ANDROID_SDK}")
-    message(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK}) 
-else ()
+if(IS_DIRECTORY "${ANDROID_SDK}")
+    message(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK})
+else()
     message(FATAL_ERROR "Couldn't detect the Android SDK directory")
 endif()
 
-if( NOT FPC_DIR)
+if(NOT FPC_DIR)
     find_program(FPC_DIR ppcrossarm)
     get_filename_component(FPC_DIR "${FPC_DIR}" PATH)
-    if(IS_DIRECTORY "${FPC_DIR}") 
-    	set(FPC_DIR "${FPC_DIR}" CACHE PATH "Path to fpc dir used in the android port" FORCE)
+    if(IS_DIRECTORY "${FPC_DIR}")
+        set(FPC_DIR "${FPC_DIR}" CACHE PATH "Path to fpc dir used in the android port" FORCE)
     endif()
 endif()
 
-if( IS_DIRECTORY "${FPC_DIR}")
-    message(STATUS "Detected the FreePascal directory at: " "${FPC_DIR}") 
-else ()
+if(IS_DIRECTORY "${FPC_DIR}")
+    message(STATUS "Detected the FreePascal directory at: ${FPC_DIR}")
+else()
     message(FATAL_ERROR "Couldn't detect the FreePascal directory")
 endif()
 
--- a/tools/CMakeLists.txt	Wed Jan 08 23:29:30 2014 +0100
+++ b/tools/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
@@ -1,4 +1,4 @@
-if (NOT APPLE)
+if(NOT APPLE)
     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
                    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
                     IMMEDIATE @ONLY)
@@ -6,7 +6,7 @@
     add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
 endif()
 
-if (APPLE)
+if(APPLE)
     find_package(Qt4 REQUIRED QUIET)
     find_package(SDL REQUIRED)
     find_package(SDL_image REQUIRED)