-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
68 lines (50 loc) · 1.79 KB
/
CMakeLists.txt
File metadata and controls
68 lines (50 loc) · 1.79 KB
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
cmake_minimum_required(VERSION 3.10)
project(StdExecutors
VERSION 7.0.0
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 17)
################################################################################
option(EXECUTORS_ENABLE_TESTING "Enable tests." Off)
option(EXECUTORS_ENABLE_EXAMPLES "Build examples." Off)
################################################################################
add_library(executors INTERFACE)
add_library(std::executors ALIAS executors)
target_include_directories(executors INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_compile_features(executors INTERFACE cxx_std_17)
################################################################################
install(TARGETS executors EXPORT executorsTargets
INCLUDES DESTINATION include
)
install(EXPORT executorsTargets
FILE executorsTargets.cmake
NAMESPACE std::
DESTINATION cmake
)
export(TARGETS executors
NAMESPACE std::
FILE executorsTargets.cmake
)
install(DIRECTORY include/experimental DESTINATION include)
install(DIRECTORY include/experimental DESTINATION include/__p0443)
include(CMakePackageConfigHelpers)
configure_package_config_file(cmake/StdExecutorsConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/StdExecutorsConfig.cmake
INSTALL_DESTINATION cmake
)
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/StdExecutorsConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/StdExecutorsConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/StdExecutorsConfigVersion.cmake
DESTINATION cmake
)
################################################################################
if(EXECUTORS_ENABLE_TESTING)
add_subdirectory(tests)
endif()
if(EXECUTORS_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif()