the default CMake(Lang)Compiler.cmake location changed since 2.8.10 cmake_pascal
authorkoda
Tue, 19 Mar 2013 00:30:30 +0100
branchcmake_pascal
changeset 8764 f16bcb3dba9e
parent 8761 801cf78707f2
child 8767 54c770f91714
the default CMake(Lang)Compiler.cmake location changed since 2.8.10
cmake_modules/CMakeDeterminePascalCompiler.cmake
--- 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")