fix a few uses of VERSION_* checks
authorkoda
Wed, 08 Jan 2014 23:46:02 +0100
changeset 9965 7ced30acf533
parent 9963 9e75dbffec81
child 9967 40750e72514b
fix a few uses of VERSION_* checks
CMakeLists.txt
hedgewars/CMakeLists.txt
--- a/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
+++ b/CMakeLists.txt	Wed Jan 08 23:46:02 2014 +0100
@@ -153,7 +153,7 @@
         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()
--- a/hedgewars/CMakeLists.txt	Wed Jan 08 23:39:43 2014 +0100
+++ b/hedgewars/CMakeLists.txt	Wed Jan 08 23:46:02 2014 +0100
@@ -97,7 +97,7 @@
 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)
+elseif(${CMAKE_Pascal_COMPILER_VERSION} VERSION_GREATER 2.4)
     #enable INLINE only with a recent version of fpc
     add_flag_prepend(CMAKE_Pascal_FLAGS_RELEASE -Si)
 endif()
@@ -167,7 +167,7 @@
     add_definitions(-dSDL_IMAGE_NEWER)
 endif(HAVE_IMGINIT)
 
-if(NOT (SDL_VERSION VERSION_LESS 2.0))
+if(${SDL_VERSION} VERSION_GREATER 1.3)
     add_definitions(-dSDL2)
 endif()
 
@@ -185,7 +185,7 @@
 #SOURCE AND PROGRAMS SECTION
 if(BUILD_ENGINE_LIBRARY)
     message("***Engine will be built as library (experimental)***")
-    if(APPLE AND current_macosx_version VERSION_GREATER "10.5")
+    if(APPLE AND ${current_macosx_version} VERSION_GREATER "10.5")
         # due to compiler/linker issues on Max OS X 10.6 -k-no_order_inits is needed to avoid linking fail
         add_flag_prepend(CMAKE_Pascal_FLAGS "-k-no_order_inits")
     endif()