16 option(NOPNG "Disable screenshoot compression (off)" OFF) |
16 option(NOPNG "Disable screenshoot compression (off)" OFF) |
17 option(NOVIDEOREC "Disable video recording (off)" OFF) |
17 option(NOVIDEOREC "Disable video recording (off)" OFF) |
18 |
18 |
19 #libraries are built shared unless explicitly added as a static |
19 #libraries are built shared unless explicitly added as a static |
20 option(BUILD_SHARED_LIBS "Build libraries as shared modules (on)" ON) |
20 option(BUILD_SHARED_LIBS "Build libraries as shared modules (on)" ON) |
21 #set this to ON when 2.1.0 becomes more widespread (and only for linux) |
|
22 option(PHYSFS_SYSTEM "Use system physfs (off)" OFF) |
|
23 |
|
24 #system paths for finding required fonts (see share/hedgewars/Data/fonts) |
|
25 #subdirectories will NOT be searched. |
|
26 #all founds that can't be found will be bundled with hedgewars |
|
27 option(PHYSFS_SYSTEM "Use system physfs (off)" OFF) |
|
28 |
|
29 option(BUILD_SHARED_LIBS "Build libraries as shared modules (on)" ON) |
|
30 |
21 |
31 if(WIN32 OR APPLE) |
22 if(WIN32 OR APPLE) |
|
23 option(PHYSFS_SYSTEM "Use system physfs (off)" OFF) |
32 option(LUA_SYSTEM "Use system lua (off)" OFF) |
24 option(LUA_SYSTEM "Use system lua (off)" OFF) |
33 else() |
25 else() |
|
26 option(PHYSFS_SYSTEM "Use system physfs (on)" ON) |
34 option(LUA_SYSTEM "Use system lua (on)" ON) |
27 option(LUA_SYSTEM "Use system lua (on)" ON) |
35 endif() |
28 endif() |
36 |
29 |
37 option(BUILD_ENGINE_LIBRARY "Enable hwengine library (off)" OFF) |
30 option(BUILD_ENGINE_LIBRARY "Enable hwengine library (off)" OFF) |
38 option(ANDROID "Enable Android build (off)" OFF) |
31 option(ANDROID "Enable Android build (off)" OFF) |
43 set(GHFLAGS "" CACHE STRING "Additional Haskell flags") |
36 set(GHFLAGS "" CACHE STRING "Additional Haskell flags") |
44 if(UNIX AND NOT APPLE) |
37 if(UNIX AND NOT APPLE) |
45 set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path") |
38 set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path") |
46 endif() |
39 endif() |
47 |
40 |
|
41 #system paths for finding required fonts (see share/hedgewars/Data/fonts) |
|
42 #subdirectories will NOT be searched. |
|
43 #all fonts that can't be found will be bundled with hedgewars |
48 set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required fonts can be found ( ; is separator)") |
44 set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required fonts can be found ( ; is separator)") |
49 |
45 |
50 #versioning |
46 #versioning |
51 set(CPACK_PACKAGE_VERSION_MAJOR 0) |
47 set(CPACK_PACKAGE_VERSION_MAJOR 0) |
52 set(CPACK_PACKAGE_VERSION_MINOR 9) |
48 set(CPACK_PACKAGE_VERSION_MINOR 9) |
159 string(REGEX MATCH "([0-9]+)" physfs_majorversion "${physfs_majorversion}") |
155 string(REGEX MATCH "([0-9]+)" physfs_majorversion "${physfs_majorversion}") |
160 string(REGEX MATCH "([0-9]+)" physfs_minorversion "${physfs_minorversion}") |
156 string(REGEX MATCH "([0-9]+)" physfs_minorversion "${physfs_minorversion}") |
161 string(REGEX MATCH "([0-9]+)" physfs_patchversion "${physfs_patchversion}") |
157 string(REGEX MATCH "([0-9]+)" physfs_patchversion "${physfs_patchversion}") |
162 set(physfs_detected_ver "${physfs_majorversion}.${physfs_minorversion}.${physfs_patchversion}") |
158 set(physfs_detected_ver "${physfs_majorversion}.${physfs_minorversion}.${physfs_patchversion}") |
163 |
159 |
164 if (physfs_detected_ver VERSION_LESS "2.0.0") |
160 if(${physfs_detected_ver} VERSION_LESS 2.0.0) |
165 message(FATAL_ERROR "PhysFS version is too old (detected ${physfs_detected_ver}, required 2.0.0)") |
161 message(FATAL_ERROR "PhysFS version is too old (detected ${physfs_detected_ver}, required 2.0.0)" |
166 set(physfs_too_old true) |
162 "Perform an update or rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
167 endif() |
163 endif() |
168 endif() |
164 endif() |
169 |
165 |
170 if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) |
166 if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR) |
171 message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |
167 message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version") |