equal
deleted
inserted
replaced
8 include(${CMAKE_MODULE_PATH}/FindSDL_Extras.cmake) |
8 include(${CMAKE_MODULE_PATH}/FindSDL_Extras.cmake) |
9 |
9 |
10 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) |
10 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) |
11 |
11 |
12 #SOURCE AND PROGRAMS SECTION |
12 #SOURCE AND PROGRAMS SECTION |
13 set(fpc_tryexe fpc) |
|
14 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) |
13 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) |
15 set(engine_output_name "hwengine") |
14 set(engine_output_name "hwengine") |
16 |
15 |
17 set(engine_sources |
16 set(engine_sources |
18 ${hwengine_project} |
17 ${hwengine_project} |
79 if(CMAKE_SIZEOF_VOID_P MATCHES "8") |
78 if(CMAKE_SIZEOF_VOID_P MATCHES "8") |
80 set(pascal_compiler_flags_cmn "-Cg" ${pascal_compiler_flags_cmn}) |
79 set(pascal_compiler_flags_cmn "-Cg" ${pascal_compiler_flags_cmn}) |
81 endif(CMAKE_SIZEOF_VOID_P MATCHES "8") |
80 endif(CMAKE_SIZEOF_VOID_P MATCHES "8") |
82 |
81 |
83 # due to compiling/linker issues on Max OS X 10.6 -k-no_order_inits is needed to avoid linking fail |
82 # due to compiling/linker issues on Max OS X 10.6 -k-no_order_inits is needed to avoid linking fail |
84 if(APPLE AND current_macosx_version MATCHES "10.6") |
83 if(APPLE AND current_macosx_version GREATER "10.5") |
85 set(pascal_compiler_flags_cmn "-k-no_order_inits" ${pascal_compiler_flags_cmn}) |
84 set(pascal_compiler_flags_cmn "-k-no_order_inits" ${pascal_compiler_flags_cmn}) |
86 endif(APPLE AND current_macosx_version MATCHES "10.6") |
85 endif() |
87 |
86 |
88 if (APPLE) |
87 if (APPLE) |
89 set(engine_output_name "hwengine.dylib") |
88 set(engine_output_name "hwengine.dylib") |
90 endif (APPLE) |
89 endif (APPLE) |
91 endif(BUILD_ENGINE_LIBRARY) |
90 endif(BUILD_ENGINE_LIBRARY) |
92 |
91 |
93 find_program(fpc_executable ${fpc_tryexe}) |
92 find_program(fpc_executable fpc) |
94 |
93 |
95 if(fpc_executable) |
94 if(fpc_executable) |
96 exec_program(${fpc_executable} ARGS "-iV" OUTPUT_VARIABLE fpc_output) |
95 exec_program(${fpc_executable} ARGS "-iV" OUTPUT_VARIABLE fpc_output) |
97 endif(fpc_executable) |
96 endif(fpc_executable) |
98 |
97 |
132 math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}") |
131 math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}") |
133 |
132 |
134 if(fpc_ver LESS "020200") |
133 if(fpc_ver LESS "020200") |
135 message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0") |
134 message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0") |
136 elseif(APPLE AND x86_64_build AND (fpc_ver LESS "020400")) |
135 elseif(APPLE AND x86_64_build AND (fpc_ver LESS "020400")) |
137 message(FATAL_ERROR "Minimum required version of FreePascal is 2.4.0 for building 64 bit applications on Mac OS X!") |
136 message(FATAL_ERROR "Minimum required version of FreePascal is 2.4.0 for building 64 bit applications on Mac OS X") |
138 endif() |
137 endif() |
139 else() |
138 else() |
140 message(FATAL_ERROR "No Pascal compiler found!") |
139 message(FATAL_ERROR "No Pascal compiler found!") |
141 endif() |
140 endif() |
142 |
141 |