equal
deleted
inserted
replaced
6 if(POLICY ${hwpolicy}) |
6 if(POLICY ${hwpolicy}) |
7 cmake_policy(SET ${hwpolicy} NEW) |
7 cmake_policy(SET ${hwpolicy} NEW) |
8 endif() |
8 endif() |
9 endforeach() |
9 endforeach() |
10 |
10 |
|
11 foreach(hwpolicy CMP0026) |
|
12 if(POLICY ${hwpolicy}) |
|
13 cmake_policy(SET ${hwpolicy} OLD) |
|
14 endif() |
|
15 endforeach() |
|
16 |
11 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules") |
17 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules") |
12 include(${CMAKE_MODULE_PATH}/utils.cmake) |
18 include(${CMAKE_MODULE_PATH}/utils.cmake) |
13 |
19 |
14 #possible cmake configuration |
20 #possible cmake configuration |
15 option(NOSERVER "Disable gameServer build (off)" OFF) |
21 option(NOSERVER "Disable gameServer build (off)" OFF) |
50 set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required fonts can be found ( ; is separator)") |
56 set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required fonts can be found ( ; is separator)") |
51 |
57 |
52 #versioning |
58 #versioning |
53 set(CPACK_PACKAGE_VERSION_MAJOR 0) |
59 set(CPACK_PACKAGE_VERSION_MAJOR 0) |
54 set(CPACK_PACKAGE_VERSION_MINOR 9) |
60 set(CPACK_PACKAGE_VERSION_MINOR 9) |
55 set(CPACK_PACKAGE_VERSION_PATCH 22) |
61 set(CPACK_PACKAGE_VERSION_PATCH 23) |
56 set(HEDGEWARS_PROTO_VER 50) |
62 set(HEDGEWARS_PROTO_VER 52) |
57 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") |
63 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") |
58 include(${CMAKE_MODULE_PATH}/revinfo.cmake) |
64 include(${CMAKE_MODULE_PATH}/revinfo.cmake) |
59 |
65 |
60 message(STATUS "Building ${HEDGEWARS_VERSION}-r${HEDGEWARS_REVISION} (${HEDGEWARS_HASH})") |
66 message(STATUS "Building ${HEDGEWARS_VERSION}-r${HEDGEWARS_REVISION} (${HEDGEWARS_HASH})") |
61 |
67 |
|
68 #io library paths |
|
69 include(${CMAKE_MODULE_PATH}/paths.cmake) |
62 #general utilities |
70 #general utilities |
63 include(${CMAKE_MODULE_PATH}/utils.cmake) |
71 include(${CMAKE_MODULE_PATH}/utils.cmake) |
64 #paths initialization |
72 #paths initialization |
65 include(${CMAKE_MODULE_PATH}/paths.cmake) |
73 include(${CMAKE_MODULE_PATH}/paths.cmake) |
66 #platform specific init code |
74 #platform specific init code |
108 else() |
116 else() |
109 message("*** GHFLAGS are available only when using CMake >= 2.8 ***") |
117 message("*** GHFLAGS are available only when using CMake >= 2.8 ***") |
110 endif() |
118 endif() |
111 endif() |
119 endif() |
112 |
120 |
113 list(APPEND haskell_flags ${ghflags_parsed} "-O2") |
|
114 |
121 |
115 #get BUILD_TYPE and enable/disable optimisation |
122 #get BUILD_TYPE and enable/disable optimisation |
116 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") |
123 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") |
117 if(CMAKE_BUILD_TYPE MATCHES "DEBUG") |
124 if(CMAKE_BUILD_TYPE MATCHES "DEBUG") |
118 list(APPEND haskell_flags "-Wall" # all warnings |
125 list(APPEND haskell_flags "-Wall" # all warnings |
119 "-debug" # debug mode |
126 "-debug" # debug mode |
120 "-dcore-lint" # internal sanity check |
|
121 "-fno-warn-unused-do-bind" |
127 "-fno-warn-unused-do-bind" |
|
128 "-O0" |
122 ) |
129 ) |
123 else() |
130 else() |
124 list(APPEND haskell_flags "-w" # no warnings |
131 list(APPEND haskell_flags "-w" # no warnings |
|
132 "-O2" |
125 ) |
133 ) |
126 endif() |
134 endif() |
127 |
135 |
128 |
136 |
129 #build engine without freepascal |
137 #build engine without freepascal |