comparison cmake/MalikaniaOptions.cmake @ 0:8991989c4708

Initial import
author David Demelier <markand@malikania.fr>
date Tue, 22 Mar 2016 18:26:05 +0100
parents
children 2418900a1cc5
comparison
equal deleted inserted replaced
-1:000000000000 0:8991989c4708
1 #
2 # CMakeLists.txt -- CMake build system for malikania
3 #
4 # Copyright (c) 2013-2016 Malikania Authors
5 #
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
9 #
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #
18
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_DOCS_UML - Enable UML diagram generation.
37 # WITH_DOCS_DOXYGEN - Enable doxygen
38 # WITH_DOCS_BOOKS - Enable build of books
39 #
40
41 option(WITH_DOCS "Build all documentation" On)
42 option(WITH_DOCS_UML "Enable UML diagrams generation" On)
43 option(WITH_DOCS_DOXYGEN "Enable doxygen generation" On)
44 option(WITH_DOCS_BOOKS "Enable build of books" On)
45
46 if (NOT WITH_DOCS)
47 set(WITH_DOCS_UML Off)
48 set(WITH_DOCS_DOXYGEN Off)
49 set(WITH_DOCS_BOOKS Off)
50 endif ()
51
52 #
53 # Targets to build
54 # -------------------------------------------------------------------
55 #
56 # The following options are available:
57 # WITH_LIBCLIENT - Build the client library.
58 # WITH_LIBSERVER - Build the server library.
59 #
60
61 option(WITH_LIBCLIENT "Build libclient" On)
62 option(WITH_LIBSERVER "Build libserver" On)
63
64 if (WITH_BACKEND MATCHES "SDL")
65 set(WITH_BACKEND_SDL TRUE)
66 else ()
67 message(FATAL_ERROR "Unknown backend selected: ${WITH_BACKEND}")
68 endif ()