-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (49 loc) · 1.36 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
cmake_minimum_required(VERSION 3.14)
include(cmake/prelude.cmake)
project(
events
VERSION 0.1.0
DESCRIPTION "Short description"
HOMEPAGE_URL "https://example.com/"
LANGUAGES NONE
)
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
find_package(Boost REQUIRED)
find_path(PLF_COLONY_INCLUDE_DIRS "plf_colony.h")
# ---- Declare library ----
add_library(events_events INTERFACE)
add_library(events::events ALIAS events_events)
set_property(
TARGET events_events PROPERTY
EXPORT_NAME events
)
target_include_directories(
events_events ${warning_guard}
INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${PLF_COLONY_INCLUDE_DIRS}>"
)
target_compile_features(events_events INTERFACE cxx_std_20)
target_link_libraries(events_events INTERFACE Boost::boost)
# ---- Install rules ----
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()
# ---- Examples ----
if(PROJECT_IS_TOP_LEVEL)
option(BUILD_EXAMPLES "Build examples tree." "${events_DEVELOPER_MODE}")
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
endif()
# ---- Developer mode ----
if(NOT events_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of events"
)
endif()
include(cmake/dev-mode.cmake)