annotate CMakeLists.txt @ 165:3e3040d085b5

Misc: reset to a new target Malikania is no longer a MMORPG engine but only a game. Creating an engine is too feature specific and hard to provide customizations without complex code. We also don't ship any Javascript bindings anymore and will use Qt 5 and QML for client side to avoid reinventing a UI toolkit. The server side is less impacted and will only take modifications in the database code which now has explicit PostgreSQL runtime dependency instead of writing a complex generic database backend.
author David Demelier <markand@malikania.fr>
date Tue, 19 Jun 2018 21:01:01 +0200
parents 4b292c20124c
children 450d884456c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
1 #
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
2 # CMakeLists.txt -- CMake build system for malikania
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
3 #
158
4b292c20124c Misc: update copyrights
David Demelier <markand@malikania.fr>
parents: 149
diff changeset
4 # Copyright (c) 2013-2018 David Demelier <markand@malikania.fr>
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
5 #
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
6 # Permission to use, copy, modify, and/or distribute this software for any
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
7 # purpose with or without fee is hereby granted, provided that the above
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
8 # copyright notice and this permission notice appear in all copies.
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
9 #
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
17 #
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
18
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
19 cmake_minimum_required(VERSION 3.0)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
20 project(malikania)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
21
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
22 set(CMAKE_CXX_STANDARD 14)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
23 set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
24 set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
25
49
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 47
diff changeset
26 include(cmake/function/MalikaniaDefineLibrary.cmake)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 47
diff changeset
27 include(cmake/function/MalikaniaDefineExecutable.cmake)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 47
diff changeset
28 include(cmake/function/MalikaniaDefineTest.cmake)
2804ae55c70f CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents: 47
diff changeset
29 include(cmake/function/MalikaniaSetg.cmake)
54
0edaba9986ba CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents: 49
diff changeset
30 include(cmake/function/MalikaniaVeraCheck.cmake)
165
3e3040d085b5 Misc: reset to a new target
David Demelier <markand@malikania.fr>
parents: 158
diff changeset
31
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
32 include(cmake/MalikaniaVersion.cmake)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
33 include(cmake/MalikaniaOptions.cmake)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
34 include(cmake/MalikaniaSystem.cmake)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
35
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
36 configure_file(
66
b2031b785cbc CMake: rename Config.h to sysconfig.hpp
David Demelier <markand@malikania.fr>
parents: 54
diff changeset
37 ${malikania_SOURCE_DIR}/cmake/internal/sysconfig.hpp.in
b2031b785cbc CMake: rename Config.h to sysconfig.hpp
David Demelier <markand@malikania.fr>
parents: 54
diff changeset
38 ${malikania_BINARY_DIR}/sysconfig.hpp
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
39 )
165
3e3040d085b5 Misc: reset to a new target
David Demelier <markand@malikania.fr>
parents: 158
diff changeset
40 include_directories(${malikania_BINARY_DIR})
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
41
149
dece83c24c64 CMake: put find_package(Boost) quiet
David Demelier <markand@malikania.fr>
parents: 127
diff changeset
42 find_package(Boost REQUIRED QUIET COMPONENTS filesystem system timer unit_test_framework)
40
1e206fdc7021 Server: switch to Boost.DLL, closes #583
David Demelier <markand@malikania.fr>
parents: 37
diff changeset
43 find_package(OpenSSL REQUIRED)
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
44
47
7097a91b08a8 Tools: add mlk-bcc tool, closes #596
David Demelier <markand@malikania.fr>
parents: 44
diff changeset
45 add_subdirectory(tools)
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
46 add_subdirectory(extern)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
47 add_subdirectory(libcommon)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
48 add_subdirectory(libserver)
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
49 add_subdirectory(server)
69
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
50
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
51 if (WITH_TESTS)
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
52 enable_testing()
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
53 add_subdirectory(tests)
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
54 endif ()
33
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
55
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
56 message("Building information:")
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
57 message(" General flags: ${CMAKE_CXX_FLAGS}")
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
58 message(" Debug flags: ${CMAKE_CXX_FLAGS_DEBUG}")
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
59 message(" Release flags: ${CMAKE_CXX_FLAGS_RELEASE}")
d4f5f7231b84 Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
60 message("")
69
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
61 message("Additional options:")
54
0edaba9986ba CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents: 49
diff changeset
62 message(" Vera: ${WITH_VERA_MSG}")
69
fce7e41875db CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents: 66
diff changeset
63 message(" Tests: ${WITH_TESTS_MSG}")