hedgewars/CMakeLists.txt
changeset 8166 5bc0fc0bab4d
parent 8164 b12634f2e1b2
child 8188 4c166505e5c8
--- a/hedgewars/CMakeLists.txt	Sat Dec 01 15:40:10 2012 -0600
+++ b/hedgewars/CMakeLists.txt	Sat Dec 01 16:03:38 2012 -0600
@@ -11,7 +11,12 @@
 #SOURCE AND PROGRAMS SECTION
 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas)
 set(engine_output_name "hwengine")
-set(required_fpc_version 2.2)
+
+if (APPLE)
+    set(required_fpc_version 2.6)
+else()
+    set(required_fpc_version 2.2)
+endif()
 
 set(engine_sources
     ${hwengine_project}
@@ -105,18 +110,12 @@
 # Check Freepascal version
 find_package(Freepascal)
 
-if (NOT APPLE)
-    if (FPC_VERSION VERSION_LESS required_fpc_version)
-        message(FATAL_ERROR "Necessary FPC version not found (version >= ${required_fpc_version} required)")
-    endif()
-elseif (APPLE)
-    if (FPC_VERSION VERSION_LESS 2.6)
-        message(FATAL_ERROR "Necessary FPC version not found (version >= 2.6 required)")
-    endif()
+if (FPC_VERSION VERSION_LESS required_fpc_version)
+    message(FATAL_ERROR "Necessary FPC version not found (version >= ${required_fpc_version} required)")
+else()
+    message(STATUS "Found FPC: ${FPC_EXECUTABLE} (version ${FPC_VERSION})")
 endif()
 
-message(STATUS "Found FPC: ${FPC_EXECUTABLE} (version ${FPC_VERSION})")
-
 
 #DEPENDECIES AND EXECUTABLES SECTION
 if(APPLE)