forked from SFTtech/openage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
86 lines (61 loc) · 2.62 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
cmake_minimum_required(VERSION 2.8.10)
#git tag --contains=fa7141f => 2.8.8 # compiler version detection
#git tag --contains=fbda7bb => 2.8.10 # find GLEW module
# main build configuration file
# text art: figlet -f rounded "[SFT] openage" | sed -e 's/\\/\\\\/g'
message("(running cmake...)
___ ______ _______ _______ ___
| _)/ _____|_______|_______|_ |
| | ( (____ _____ _ | | ___ ____ _____ ____ _____ ____ _____
| | \\____ \\| ___) | | | | / _ \\| _ \\| ___ | _ \\(____ |/ _ | ___ |
| |_ _____) ) | | | _| | | |_| | |_| | ____| | | / ___ ( (_| | ____|
|___|______/|_| |_| (___| \\___/| __/|_____)_| |_\\_____|\\___ |_____)
|_| (_____|
Welcome to the SFT technologies computer-aided openage build system!
You have chosen, or been chosen, to attempt the daring task of building openage.
If you have installed all the dependencies that are conveniently listed in [building.md], this _might_ work!
If it doesn't, consider reporting the issue/asking for help in #sfttech on freenode.net.
")
project(openage C CXX)
# options: keep up to date with those in ./configure!
if(NOT DEFINED WANT_INOTIFY)
set(WANT_INOTIFY if_available)
endif()
if(NOT DEFINED WANT_GPERFTOOLS_PROFILER)
set(WANT_GPERFTOOLS_PROFILER if_available)
endif()
if(NOT DEFINED WANT_GPERFTOOLS_TCMALLOC)
set(WANT_GPERFTOOLS_TCMALLOC false)
endif()
set(BUILDSYSTEM_DIR "${CMAKE_SOURCE_DIR}/buildsystem")
set(CMAKE_MODULE_PATH "${BUILDSYSTEM_DIR}/modules/")
# include build configuration modules
include("CTest")
include("${BUILDSYSTEM_DIR}/util.cmake")
include("${BUILDSYSTEM_DIR}/python.cmake")
include("${BUILDSYSTEM_DIR}/cpp.cmake")
include("${BUILDSYSTEM_DIR}/codegen.cmake")
include("${BUILDSYSTEM_DIR}/testing.cmake")
include("${BUILDSYSTEM_DIR}/assets.cmake")
include("${BUILDSYSTEM_DIR}/version.cmake")
include("${BUILDSYSTEM_DIR}/doxygen.cmake")
disallow_in_source_builds()
# create python config file
configure_file(py/openage/config.py.in "${CMAKE_SOURCE_DIR}/py/openage/config.py")
# create documentation for cpp and py folders
doxygen_configure(cpp/ py/)
add_subdirectory(cpp/)
add_subdirectory(dist/)
add_subdirectory(py/)
# process the included python sources, generate setup.py
process_python_modules()
print_config_options()
# show build configuration overview
message("${PROJECT_NAME} ${PROJECT_VERSION}
compiler | ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}
cxxflags | ${CMAKE_CXX_FLAGS}
install prefix | ${CMAKE_INSTALL_PREFIX}
build dir | ${CMAKE_BINARY_DIR}
")
# detect missing run-time dependencies
warn_runtime_depends()