annotate CMakeLists.txt @ 116:0a6683615c73

cmake: change build system, continue #2487 @3h
author David Demelier <markand@malikania.fr>
date Sat, 03 Oct 2020 18:32:01 +0200
parents
children 3411daa26432
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
116
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 #
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 # CMakeLists.txt -- CMake build system for molko
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 #
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 # Copyright (c) 2020 David Demelier <markand@malikania.fr>
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 #
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # Permission to use, copy, modify, and/or distribute this software for any
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # purpose with or without fee is hereby granted, provided that the above
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 # copyright notice and this permission notice appear in all copies.
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 #
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 #
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 cmake_minimum_required(VERSION 3.18)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 project(molko)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
21
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 include(GNUInstallDirs)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
23
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 set(CMAKE_C_STANDARD 11)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 set(CMAKE_C_STANDARD_REQUIRED On)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 set(CMAKE_C_EXTENSIONS Off)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
28
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 find_package(Jansson REQUIRED)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 find_package(SDL2 REQUIRED COMPONENTS image mixer ttf)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
31
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 add_subdirectory(extern/libsqlite)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 add_subdirectory(extern/libgreatest)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
34
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 add_subdirectory(doxygen)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
36
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 add_subdirectory(tools/bcc)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 add_subdirectory(tools/map)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
39
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 add_subdirectory(assets)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
41
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 add_subdirectory(src/core)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 add_subdirectory(src/adventure)
0a6683615c73 cmake: change build system, continue #2487 @3h
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 add_subdirectory(src/molko)