-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (34 loc) · 1.3 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
cmake_minimum_required(VERSION 3.26)
project(adbus)
include(FeatureSummary)
option(BUILD_TESTING "Build tests" ON)
add_feature_info(BUILD_TESTING BUILD_TESTING "Build tests")
#set(CMAKE_CXX_STANDARD 26)
add_compile_options(-std=c++2c)
#add_compile_options(-Wall -Wextra -Werror -Wpedantic -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-private-field -Wno-unused-const-variable -Wno-unused-value)
include(cmake/CPM.cmake)
CPMAddPackage(
glaze
GITHUB_REPOSITORY stephenberry/glaze
GIT_TAG v2.6.9
GIT_SHALLOW TRUE
)
find_package(fmt CONFIG REQUIRED)
find_package(glaze REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
add_link_options( -lasan -lubsan )
add_library(adbus INTERFACE)
add_library(adbus::adbus ALIAS adbus)
target_include_directories(adbus
INTERFACE
${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_LIST_DIR}/include/adbus/ext # todo make proper usage of this, like name it with adbus prefix, so conflicts won't arise
)
target_link_libraries(adbus INTERFACE fmt::fmt glaze::glaze
Boost::system # todo remove, need to make cmake option whether using boost asio or asio
)
add_executable(adbus_example main.cpp)
target_link_libraries(adbus_example PRIVATE adbus::adbus)
if (BUILD_TESTING)
add_subdirectory(test)
endif()