-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (55 loc) · 1.25 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.27)
project(kouta)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(GNUInstallDirs)
include(cmake/helper.cmake)
# Options
option(KOUTA_BUILD_TESTS "Enable compilation of tests" OFF)
option(KOUTA_BUILD_SHARED "Build shared library" OFF)
# Boost
set(BOOST_MIN_VERSION "1.78.0")
find_package(Boost ${BOOST_MIN_VERSION} REQUIRED
COMPONENTS
system
)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
# Kouta
include_directories(${PROJECT_SOURCE_DIR}/include)
kouta_add_library(
TARGET base
HEADERS
"base/callback/base-callback.hpp"
"base/callback/callback-list.hpp"
"base/callback/deferred-callback.hpp"
"base/callback/direct-callback.hpp"
"base/branch.hpp"
"base/callback.hpp"
"base/component.hpp"
"base/root.hpp"
SOURCES
"base.cpp"
LIBS
Boost::system
)
kouta_add_library(
TARGET io
HEADERS
"io/packer.hpp"
"io/parser.hpp"
"io/timer.hpp"
SOURCES
"io.cpp"
INTERNAL
"base"
)
kouta_add_library(
TARGET utils
HEADERS
"utils/enum-set.hpp"
SOURCES
"utils.cpp"
)
# Tests
add_subdirectory("tests")