generated from cpp-best-practices/gui_starter_template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
91 lines (74 loc) · 2.09 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
cmake_minimum_required(VERSION 3.15)
project(Flow LANGUAGES CXX VERSION 0.0.1)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
add_library(project_options INTERFACE)
add_library(project_warnings INTERFACE)
include(cmake/SetUp.cmake)
option(ENABLE_PCH "Enable Precompiled Headers" ON)
option(ENABLE_EXAMPLES "Enable Examples" ON)
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
option(ENABLE_TESTING "Enable Test Builds" ON)
include(cmake/Conan.cmake)
run_conan()
find_package(cppcoro REQUIRED)
find_package(Threads REQUIRED)
find_package(liburing REQUIRED)
add_subdirectory(src)
if (ENABLE_PCH)
list(APPEND public_headers
chain
concepts
configuration
flow
network
network_handle
operator_pipe
publisher
spin
spinner
subscriber
transformer)
foreach (header ${public_headers})
list(APPEND headers "include/flow/${header}.hpp")
endforeach ()
list(APPEND detail_headers
cancellable_function
cancellation_handle
channel_resource
channel_set
forward
hash
metaprogramming
multi_channel
publisher_token
routine
single_channel
spin_routine
spin_wait
subscriber_token
timeout_routine)
foreach (header ${detail_headers})
list(APPEND headers "include/flow/detail/${header}.hpp")
endforeach ()
target_precompile_headers(
flow
PUBLIC
${headers}
PRIVATE
<vector>
<unordered_map>
)
endif ()
if (ENABLE_EXAMPLES)
add_subdirectory(examples)
endif ()
if (ENABLE_TESTING)
enable_testing()
add_subdirectory(test)
endif ()
option(ENABLE_UNITY "Enable Unity builds of projects" OFF)
if (ENABLE_UNITY)
# Add for any project you want to apply unity builds for
set_target_properties(intro PROPERTIES UNITY_BUILD ON)
endif ()
include(cmake/ExportLibrary.cmake)