--- a/cmake_modules/FindFreepascal.cmake Mon Dec 03 01:43:52 2012 +0100
+++ b/cmake_modules/FindFreepascal.cmake Mon Dec 03 01:45:59 2012 +0100
@@ -13,8 +13,9 @@
string(REGEX MATCH "[0-9]+\\.[0-9]+" FPC_VERSION_LONG "${FPC_VERSION_FULL}")
string(REGEX REPLACE "([0-9]+\\.[0-9]+)" "\\1" FPC_VERSION "${FPC_VERSION_LONG}")
+ message(STATUS "Found Freepascal: ${FPC_EXECUTABLE} (version ${FPC_VERSION}")
else()
- message(FATAL_ERROR "Freepascal not found (required for hedgewars)")
+ message(FATAL_ERROR "Could NOT find Freepascal")
endif()
# Check for noexecstack flag support
@@ -32,3 +33,4 @@
else(TEST_NOEXECSTACK)
message(STATUS "Checking whether linker needs explicit noexecstack -- yes")
endif(TEST_NOEXECSTACK)
+
--- a/hedgewars/CMakeLists.txt Mon Dec 03 01:43:52 2012 +0100
+++ b/hedgewars/CMakeLists.txt Mon Dec 03 01:45:59 2012 +0100
@@ -111,9 +111,7 @@
find_package(Freepascal)
if (FPC_VERSION VERSION_LESS required_fpc_version)
- message(FATAL_ERROR "Necessary FPC version not found (required version = ${required_fpc_version})")
-else()
- message(STATUS "Found FPC: ${FPC_EXECUTABLE} (version ${FPC_VERSION})")
+ message(FATAL_ERROR "Freepascal is too old, minimum version required is ${required_fpc_version}")
endif()
@@ -165,9 +163,8 @@
#this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
-if(FPC_VERSION LESS "020600")
+if(FPC_VERSION VERSION_LESS "2.6")
#under some configurations CMAKE_BUILD_TOOL fails to pass on the jobserver, breaking parallel compilation
- #TODO: check if this is needed on windows too
if(UNIX)
set(SAFE_BUILD_TOOL $(MAKE))
else()
@@ -254,7 +251,7 @@
endif()
#this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6
-if((FPC_VERSION LESS "020600") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND}))
+if((FPC_VERSION VERSION_LESS "2.6") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND}))
add_dependencies(${engine_output_name} ENGINECLEAN)
endif()