Mercurial > malikania
annotate cmake/MalikaniaOptions.cmake @ 100:0e9c01d3e0d1
Misc: write database specs, closes #682
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 21 Aug 2017 07:39:41 +0200 |
parents | 55300686bd78 |
children | 119bcc5a727e |
rev | line source |
---|---|
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
1 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
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:
30
diff
changeset
|
3 # |
76 | 4 # Copyright (c) 2013-2017 Malikania Authors |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
5 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
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:
30
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:
30
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:
30
diff
changeset
|
9 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
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:
30
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:
30
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:
30
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:
30
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:
30
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:
30
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:
30
diff
changeset
|
17 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
18 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
19 # |
50
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
20 # Fakeroot directory. |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
21 # ------------------------------------------------------------------- |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
22 # |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
23 # This option specifies where to build the project as it would be installed |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
24 # using the install target or installers. |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
25 # |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
26 # This helps development. |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
27 # |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
28 |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
29 set(WITH_FAKEROOT_DIR "${CMAKE_BINARY_DIR}/fakeroot" |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
30 CACHE STRING "Where to build project as it would be installed") |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
31 |
697bf85e8e19
CMake: move executables into fakeroot/bin
David Demelier <markand@malikania.fr>
parents:
49
diff
changeset
|
32 # |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
33 # Backend selection. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
34 # ------------------------------------------------------------------- |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
35 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
36 # The following options are available: |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
37 # WITH_BACKEND - Type of backend to use. (Default: SDL) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
38 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
39 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
40 set(WITH_BACKEND "SDL" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
41 CACHE STRING "Which backend to use") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
42 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
43 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
44 # Documentation and technical references |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
45 # ------------------------------------------------------------------- |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
46 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
47 # The following options are available: |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
48 # WITH_DOCS - Disable or enable all docs, if set to Off, disable all documentation. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
49 # WITH_DOXYGEN - Enable doxygen |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
50 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
51 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
52 option(WITH_DOCS "Build all documentation" On) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
53 option(WITH_DOXYGEN "Enable doxygen generation" On) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
54 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
55 if (NOT WITH_DOCS) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
56 set(WITH_DOXYGEN Off) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
57 endif () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
58 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
59 set(WITH_DRIVERDIR "lib/malikania/${MALIKANIA_VERSION}" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
60 CACHE STRING "Database driver directory") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
61 set(WITH_BINDIR "libexec/malikania/${MALIKANIA_VERSION}" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
62 CACHE STRING "Front end directory") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
63 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
64 if (IS_ABSOLUTE ${WITH_DRIVERDIR}) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
65 message(FATAL_ERROR "WITH_DRIVERDIR must not be absolute") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
66 elseif (IS_ABSOLUTE ${WITH_BINDIR}) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
67 message(FATAL_ERROR "WITH_BINDIR must not be absolute") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
68 endif () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
69 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
70 # |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
71 # Options for development. |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
72 # ------------------------------------------------------------------- |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
73 # |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
74 |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
75 option(WITH_VERA "Enable vera++ analyzer" On) |
69
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
76 option(WITH_TESTS "Enable unit tests" On) |
74
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
77 option(WITH_EXAMPLES "Enable examples" On) |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
78 |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
79 find_program(VERA_EXECUTABLE vera++) |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
80 |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
81 if (VERA_EXECUTABLE) |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
82 if (WITH_VERA) |
96
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
83 execute_process( |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
84 COMMAND ${VERA_EXECUTABLE} --version |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
85 OUTPUT_VARIABLE VERA_VERSION |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
86 ) |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
87 |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
88 if (${VERA_VERSION} VERSION_LESS "1.3.0") |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
89 malikania_setg(WITH_VERA Off) |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
90 malikania_setg(WITH_VERA_MSG "No (1.3.0 or greater required)") |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
91 else () |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
92 malikania_setg(WITH_VERA_MSG "Yes") |
55300686bd78
CMake: check that vera++ is at least 1.3.0, closes #656
David Demelier <markand@malikania.fr>
parents:
79
diff
changeset
|
93 endif () |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
94 else () |
79
8b41e9a2e095
CMake: fix vera conditional
Alexis Dörr <nanahara@malikania.fr>
parents:
76
diff
changeset
|
95 malikania_setg(WITH_VERA Off) |
8b41e9a2e095
CMake: fix vera conditional
Alexis Dörr <nanahara@malikania.fr>
parents:
76
diff
changeset
|
96 malikania_setg(WITH_VERA_MSG "No (disabled by user)") |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
97 endif () |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
98 else () |
79
8b41e9a2e095
CMake: fix vera conditional
Alexis Dörr <nanahara@malikania.fr>
parents:
76
diff
changeset
|
99 malikania_setg(WITH_VERA Off) |
8b41e9a2e095
CMake: fix vera conditional
Alexis Dörr <nanahara@malikania.fr>
parents:
76
diff
changeset
|
100 malikania_setg(WITH_VERA_MSG "No (vera++ not found)") |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
101 endif () |
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
102 |
69
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
103 if (NOT WITH_TESTS) |
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
104 malikania_setg(WITH_TESTS_MSG "No (disabled by user)") |
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
105 else () |
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
106 malikania_setg(WITH_TESTS_MSG "Yes") |
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
107 endif () |
fce7e41875db
CMake: add WITH_TESTS option
David Demelier <markand@malikania.fr>
parents:
54
diff
changeset
|
108 |
74
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
109 if (NOT WITH_EXAMPLES) |
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
110 malikania_setg(WITH_EXAMPLES_MSG "No (disabled by user)") |
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
111 else () |
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
112 malikania_setg(WITH_EXAMPLES_MSG "Yes") |
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
113 endif () |
78de82cc6bde
Tests: move graphical examples into examples, closes #606
David Demelier <markand@malikania.fr>
parents:
69
diff
changeset
|
114 |
54
0edaba9986ba
CMake: add vera++, closes 602
David Demelier <markand@malikania.fr>
parents:
50
diff
changeset
|
115 # |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
116 # Options for unit tests |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
117 # ------------------------------------------------------------------- |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
118 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
119 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
120 set(WITH_TEST_PGSQL_HOST "localhost" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
121 CACHE STRING "Hostname for PostgreSQL driver") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
122 set(WITH_TEST_PGSQL_PORT "5432" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
123 CACHE STRING "Port for PostgreSQL driver") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
124 set(WITH_TEST_PGSQL_DATABASE "malikaniadb" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
125 CACHE STRING "Database for PostgreSQL driver") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
126 set(WITH_TEST_PGSQL_USER "malikania" |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
127 CACHE STRING "Username for PostgreSQL driver") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
128 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
129 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
130 # Targets to build |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
131 # ------------------------------------------------------------------- |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
132 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
133 # The following options are available: |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
134 # WITH_LIBCLIENT - Build the client library. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
135 # WITH_LIBSERVER - Build the server library. |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
136 # |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
137 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
138 option(WITH_LIBCLIENT "Build libclient" On) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
139 option(WITH_LIBSERVER "Build libserver" On) |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
140 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
141 if (WITH_BACKEND MATCHES "SDL") |
49
2804ae55c70f
CMake: big cleanup, closes #598
David Demelier <markand@malikania.fr>
parents:
33
diff
changeset
|
142 set(WITH_BACKEND_DIR "backend/sdl") |
33
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
143 else () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
144 message(FATAL_ERROR "Unknown backend selected: ${WITH_BACKEND}") |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
145 endif () |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
146 |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
147 configure_file( |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
148 ${malikania_SOURCE_DIR}/cmake/internal/sysconfig-tests.h |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
149 ${malikania_BINARY_DIR}/sysconfig-tests.h |
d4f5f7231b84
Misc: switch to .hpp, dos2unix everything while here, #478
David Demelier <markand@malikania.fr>
parents:
30
diff
changeset
|
150 ) |