comparison cmake/MalikaniaOptions.cmake @ 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 3107ce017c3a
comparison
equal deleted inserted replaced
164:a3ba00cdaa7c 165:3e3040d085b5
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 # 17 #
18 18
19 # 19 #
20 # Backend selection.
21 # -------------------------------------------------------------------
22 #
23 # The following options are available:
24 # WITH_BACKEND - Type of backend to use. (Default: SDL)
25 #
26
27 set(WITH_BACKEND "SDL"
28 CACHE STRING "Which backend to use")
29
30 #
31 # Documentation and technical references
32 # -------------------------------------------------------------------
33 #
34 # The following options are available:
35 # WITH_DOCS - Disable or enable all docs, if set to Off, disable all documentation.
36 # WITH_DOXYGEN - Enable doxygen
37 #
38
39 option(WITH_DOCS "Build all documentation" On)
40 option(WITH_DOXYGEN "Enable doxygen generation" On)
41
42 if (NOT WITH_DOCS)
43 set(WITH_DOXYGEN Off)
44 endif ()
45
46 set(WITH_DRIVERDIR "lib/malikania/${MALIKANIA_VERSION}"
47 CACHE STRING "Database driver directory")
48 set(WITH_BINDIR "libexec/malikania/${MALIKANIA_VERSION}"
49 CACHE STRING "Front end directory")
50
51 if (IS_ABSOLUTE ${WITH_DRIVERDIR})
52 message(FATAL_ERROR "WITH_DRIVERDIR must not be absolute")
53 elseif (IS_ABSOLUTE ${WITH_BINDIR})
54 message(FATAL_ERROR "WITH_BINDIR must not be absolute")
55 endif ()
56
57 #
58 # Options for development. 20 # Options for development.
59 # ------------------------------------------------------------------- 21 # -------------------------------------------------------------------
60 # 22 #
61 23
62 option(WITH_VERA "Enable vera++ analyzer" On) 24 option(WITH_VERA "Enable vera++ analyzer" On)
63 option(WITH_TESTS "Enable unit tests" On) 25 option(WITH_TESTS "Enable unit tests" On)
64 option(WITH_EXAMPLES "Enable examples" On)
65 26
66 find_program(VERA_EXECUTABLE vera++) 27 find_program(VERA_EXECUTABLE vera++)
67 28
68 if (VERA_EXECUTABLE) 29 if (VERA_EXECUTABLE)
69 if (WITH_VERA) 30 if (WITH_VERA)
91 malikania_setg(WITH_TESTS_MSG "No (disabled by user)") 52 malikania_setg(WITH_TESTS_MSG "No (disabled by user)")
92 else () 53 else ()
93 malikania_setg(WITH_TESTS_MSG "Yes") 54 malikania_setg(WITH_TESTS_MSG "Yes")
94 endif () 55 endif ()
95 56
96 if (NOT WITH_EXAMPLES)
97 malikania_setg(WITH_EXAMPLES_MSG "No (disabled by user)")
98 else ()
99 malikania_setg(WITH_EXAMPLES_MSG "Yes")
100 endif ()
101
102 # 57 #
103 # Options for unit tests 58 # Options for unit tests
104 # ------------------------------------------------------------------- 59 # -------------------------------------------------------------------
105 # 60 #
106 61
123 # 78 #
124 79
125 option(WITH_LIBCLIENT "Build libclient" On) 80 option(WITH_LIBCLIENT "Build libclient" On)
126 option(WITH_LIBSERVER "Build libserver" On) 81 option(WITH_LIBSERVER "Build libserver" On)
127 82
128 if (WITH_BACKEND MATCHES "SDL")
129 set(WITH_BACKEND_DIR "backend/sdl")
130 else ()
131 message(FATAL_ERROR "Unknown backend selected: ${WITH_BACKEND}")
132 endif ()
133
134 configure_file( 83 configure_file(
135 ${malikania_SOURCE_DIR}/cmake/internal/sysconfig-tests.h 84 ${malikania_SOURCE_DIR}/cmake/internal/sysconfig-tests.hpp.in
136 ${malikania_BINARY_DIR}/sysconfig-tests.h 85 ${malikania_BINARY_DIR}/sysconfig-tests.hpp
137 ) 86 )