-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (24 loc) · 893 Bytes
/
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
cmake_minimum_required(VERSION 3.16.3)
project(modb LANGUAGES CXX)
############################## configurations ##############################
add_compile_options(-Wall -Werror)
add_link_options(-pie)
set(CMAKE_CXX_STANDARD 20)
############################## libraries ##############################
find_package(Boost REQUIRED COMPONENTS serialization iostreams filesystem)
include_directories(
${Boost_INCLUDE_DIRS}
)
link_libraries(
${Boost_LIBRARIES}
)
add_library(json INTERFACE)
target_include_directories(json INTERFACE lib/json/single_include)
add_library(nlohmann::json ALIAS json)
############################## options ##############################
option(BUILD_EXAMPLES "build examples for modb" OFF)
############################## targets ##############################
add_subdirectory(modb)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()