--- a/cmake_modules/CMakeDeterminePascalCompiler.cmake Mon Mar 18 20:10:27 2013 +0100
+++ b/cmake_modules/CMakeDeterminePascalCompiler.cmake Tue Mar 19 00:30:30 2013 +0100
@@ -53,10 +53,16 @@
MARK_AS_ADVANCED(CMAKE_RANLIB)
# configure variables set in this file for fast reload later on
-#CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakePascalCompiler.cmake.in
-CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
- "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakePascalCompiler.cmake"
- IMMEDIATE)
+if(${CMAKE_VERSION} VERSION_LESS 2.8.10)
+ CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
+ "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakePascalCompiler.cmake"
+ IMMEDIATE )
+else(${CMAKE_VERSION} VERSION_LESS 2.8.10)
+ CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in
+ "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${CMAKE_VERSION}/CMakePascalCompiler.cmake"
+ IMMEDIATE )
+endif(${CMAKE_VERSION} VERSION_LESS 2.8.10)
+
MARK_AS_ADVANCED(CMAKE_AR)
SET(CMAKE_Pascal_COMPILER_ENV_VAR "FPC")