-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (42 loc) · 1.48 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
# cmake-format: off
# /CMakeLists.txt -*-makefile-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on
cmake_minimum_required(VERSION 3.23)
project(beman_net29 VERSION 0.0.0 LANGUAGES CXX)
set(TARGET_NAME net29)
set(TARGET_PREFIX beman.${TARGET_NAME})
set(TARGET_LIBRARY beman_${TARGET_NAME})
set(TARGET_ALIAS beman::${TARGET_NAME})
set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
set(CMAKE_CXX_STANDARD 23)
include(FetchContent)
FetchContent_Declare(
execution26
# for local development, use SOURCE_DIR <path-to>/execution26
GIT_REPOSITORY https://github.com/beman-project/execution26
GIT_TAG 81c58fe
)
FetchContent_MakeAvailable(execution26)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(src/beman/${TARGET_NAME}/tests)
enable_testing()
endif()
add_subdirectory(src/beman/net29)
add_subdirectory(examples)
include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)
configure_package_config_file(
"cmake/Config.cmake.in"
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${INSTALL_CONFIGDIR})
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${INSTALL_CONFIGDIR})