52 option(NOVERSIONINFOUPDATE "Disable update of version_info.txt. To be used if source is in a git/repo that is NOT the hedgewars repo" OFF) |
52 option(NOVERSIONINFOUPDATE "Disable update of version_info.txt. To be used if source is in a git/repo that is NOT the hedgewars repo" OFF) |
53 |
53 |
54 |
54 |
55 if(BUILD_ENGINE_JS) |
55 if(BUILD_ENGINE_JS) |
56 if(NOT CMAKE_TOOLCHAIN_FILE) |
56 if(NOT CMAKE_TOOLCHAIN_FILE) |
57 message(FATAL_ERROR "Missing emscripten toolchain file\nRerun cmake with -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake_modules/Platform/Emscripten.cmake") |
57 message(FATAL_ERROR "Missing emscripten toolchain file\nClean your cache and rerun cmake with -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake_modules/Platform/Emscripten.cmake") |
58 endif() |
58 endif() |
59 |
59 |
60 set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
60 set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
|
61 set(BUILD_ENGINE_LIBRARY ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
61 set(NOAUTOUPDATE ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
62 set(NOAUTOUPDATE ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
62 set(PHYSFS_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
63 set(PHYSFS_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
63 set(LUA_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
64 set(LUA_SYSTEM OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
64 set(NOVIDEOREC ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
65 set(NOVIDEOREC ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
65 set(NOSERVER ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
66 set(NOSERVER ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
66 set(GL2 ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
67 set(GL2 ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
67 set(BUILD_SHARED_LIBS OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
68 set(BUILD_SHARED_LIBS OFF CACHE STRING "Required for BUILD_ENGINE_JS" FORCE) |
|
69 |
|
70 set(target_binary_install_dir "bin" CACHE PATH "install dest for binaries") |
|
71 set(target_library_install_dir "lib" CACHE PATH "install dest for libs") |
68 endif() |
72 endif() |
69 |
73 |
70 #system paths for finding required fonts (see share/hedgewars/Data/fonts) |
74 #system paths for finding required fonts (see share/hedgewars/Data/fonts) |
71 #subdirectories will NOT be searched. |
75 #subdirectories will NOT be searched. |
72 #all fonts that can't be found will be bundled with hedgewars |
76 #all fonts that can't be found will be bundled with hedgewars |
84 |
88 |
85 #io library paths |
89 #io library paths |
86 include(${CMAKE_MODULE_PATH}/paths.cmake) |
90 include(${CMAKE_MODULE_PATH}/paths.cmake) |
87 #general utilities |
91 #general utilities |
88 include(${CMAKE_MODULE_PATH}/utils.cmake) |
92 include(${CMAKE_MODULE_PATH}/utils.cmake) |
89 #paths initialization |
|
90 include(${CMAKE_MODULE_PATH}/paths.cmake) |
|
91 #platform specific init code |
93 #platform specific init code |
92 include(${CMAKE_MODULE_PATH}/platform.cmake) |
94 include(${CMAKE_MODULE_PATH}/platform.cmake) |
93 |
95 |
94 |
96 |
95 #when build type is not specified, assume Debug/Release according to build version information |
97 #when build type is not specified, assume Debug/Release according to build version information |