Mercurial > irccd
comparison CMakeLists.txt @ 948:21a91311c8ea
cmake: switch back, GNU make is painful
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 16 Jan 2021 17:58:46 +0100 |
parents | |
children | 9fcb0038fe0a |
comparison
equal
deleted
inserted
replaced
947:95201fd9ad88 | 948:21a91311c8ea |
---|---|
1 # | |
2 # CMakeLists.txt -- CMake build for irccd | |
3 # | |
4 # Copyright (c) 2013-2021 David Demelier <markand@malikania.fr> | |
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 cmake_minimum_required(VERSION 3.12) | |
20 project(irccd) | |
21 | |
22 set_property(GLOBAL PROPERTY USE_FOLDERS On) | |
23 | |
24 set(IRCCD_VERSION_MAJOR 4) | |
25 set(IRCCD_VERSION_MINOR 0) | |
26 set(IRCCD_VERSION_PATCH 0) | |
27 | |
28 option(IRCCD_WITH_JS "Enable Javascript" On) | |
29 option(IRCCD_WITH_SSL "Enable SSL support" On) | |
30 option(IRCCD_WITH_IRCCD "Enable irccd daemon" On) | |
31 option(IRCCD_WITH_IRCCDCTL "Enable irccdctl utility" On) | |
32 option(IRCCD_WITH_TESTS "Enable unit tests" Off) | |
33 | |
34 if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") | |
35 set(CMAKE_C_FLAGS "-Wall -Wextra") | |
36 endif () | |
37 | |
38 include(GNUInstallDirs) | |
39 | |
40 add_subdirectory(extern/libcompat) | |
41 | |
42 if (IRCCD_WITH_JS) | |
43 add_subdirectory(extern/libduktape) | |
44 endif () | |
45 | |
46 add_subdirectory(lib) | |
47 add_subdirectory(irccd) | |
48 add_subdirectory(irccdctl) | |
49 | |
50 if (IRCCD_WITH_TESTS) | |
51 enable_testing() | |
52 add_subdirectory(extern/libgreatest) | |
53 add_subdirectory(tests) | |
54 endif () |