equal
deleted
inserted
replaced
9 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) |
9 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) |
10 |
10 |
11 #SOURCE AND PROGRAMS SECTION |
11 #SOURCE AND PROGRAMS SECTION |
12 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) |
12 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) |
13 set(engine_output_name "hwengine") |
13 set(engine_output_name "hwengine") |
14 set(required_fpc_version 2.2) |
14 |
|
15 if (APPLE) |
|
16 set(required_fpc_version 2.6) |
|
17 else() |
|
18 set(required_fpc_version 2.2) |
|
19 endif() |
15 |
20 |
16 set(engine_sources |
21 set(engine_sources |
17 ${hwengine_project} |
22 ${hwengine_project} |
18 LuaPas.pas |
23 LuaPas.pas |
19 PNGh.pas |
24 PNGh.pas |
103 |
108 |
104 |
109 |
105 # Check Freepascal version |
110 # Check Freepascal version |
106 find_package(Freepascal) |
111 find_package(Freepascal) |
107 |
112 |
108 if (NOT APPLE) |
113 if (FPC_VERSION VERSION_LESS required_fpc_version) |
109 if (FPC_VERSION VERSION_LESS required_fpc_version) |
114 message(FATAL_ERROR "Necessary FPC version not found (version >= ${required_fpc_version} required)") |
110 message(FATAL_ERROR "Necessary FPC version not found (version >= ${required_fpc_version} required)") |
115 else() |
111 endif() |
116 message(STATUS "Found FPC: ${FPC_EXECUTABLE} (version ${FPC_VERSION})") |
112 elseif (APPLE) |
117 endif() |
113 if (FPC_VERSION VERSION_LESS 2.6) |
|
114 message(FATAL_ERROR "Necessary FPC version not found (version >= 2.6 required)") |
|
115 endif() |
|
116 endif() |
|
117 |
|
118 message(STATUS "Found FPC: ${FPC_EXECUTABLE} (version ${FPC_VERSION})") |
|
119 |
118 |
120 |
119 |
121 #DEPENDECIES AND EXECUTABLES SECTION |
120 #DEPENDECIES AND EXECUTABLES SECTION |
122 if(APPLE) |
121 if(APPLE) |
123 string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}") |
122 string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}") |