Mercurial > malikania
annotate CMakeLists.txt @ 44:f30c84b4b9ed
Tests: switch from GoogleTest to Boost.Unit, closes #588
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 30 Nov 2016 21:15:53 +0100 |
parents | 3645200f46bf |
children | 7097a91b08a8 |
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 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
4 # Copyright (c) 2013-2016 Malikania Authors |
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( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
23 CMAKE_MODULE_PATH |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
24 "${malikania_SOURCE_DIR}/cmake" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
25 "${malikania_SOURCE_DIR}/cmake/internal" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
26 "${malikania_SOURCE_DIR}/cmake/packages" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
27 ) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
28 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
29 set(CMAKE_CXX_STANDARD 14) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
30 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
|
31 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
|
32 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
33 include(cmake/MalikaniaVersion.cmake) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
34 include(cmake/MalikaniaOptions.cmake) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
35 include(cmake/MalikaniaFunctions.cmake) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
36 include(cmake/MalikaniaSystem.cmake) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
37 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
38 configure_file( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
39 ${malikania_SOURCE_DIR}/cmake/internal/Config.h.in |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
40 ${malikania_BINARY_DIR}/Config.h |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
41 ) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
42 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
43 include_directories(${CMAKE_BINARY_DIR}) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
44 enable_testing() |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
45 |
44
f30c84b4b9ed
Tests: switch from GoogleTest to Boost.Unit, closes #588
David Demelier <markand@malikania.fr>
parents:
41
diff
changeset
|
46 find_package(Boost REQUIRED 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
|
47 find_package(OpenSSL REQUIRED) |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
48 find_package(ZIP REQUIRED) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
49 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
50 add_subdirectory(extern) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
51 add_subdirectory(database) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
52 add_subdirectory(docs) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
53 add_subdirectory(libcommon) |
37
702e0a2b9e5e
Misc: make JavaScript different libraries, Closes T3
David Demelier <markand@malikania.fr>
parents:
33
diff
changeset
|
54 add_subdirectory(libcommon-js) |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
55 add_subdirectory(libclient) |
37
702e0a2b9e5e
Misc: make JavaScript different libraries, Closes T3
David Demelier <markand@malikania.fr>
parents:
33
diff
changeset
|
56 add_subdirectory(libclient-js) |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
57 add_subdirectory(libserver) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
58 add_subdirectory(client) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
59 add_subdirectory(server) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
60 add_subdirectory(tests) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
61 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
62 message("Building information:") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 message("") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
67 message("Documentation:") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
31
diff
changeset
|
68 message(" Doxygen: ${WITH_DOCS_DOXYGEN_MSG}") |