forked from marcliangma8/cbor11
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
29 lines (25 loc) · 972 Bytes
/
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
cmake_minimum_required (VERSION 3.1)
project(cbor11)
set(CMAKE_CXX_STANDARD 11)
add_library(cbor11 src/cbor11.cpp)
target_include_directories(cbor11 PRIVATE include)
include(CTest)
add_executable(cbor11-tests tst/cbor11_tests.cpp)
target_link_libraries(cbor11-tests cbor11)
target_include_directories(cbor11-tests PRIVATE include)
if(ENABLE_ASAN)
target_compile_options(cbor11 PUBLIC "-fsanitize=address,undefined")
target_link_libraries(cbor11 INTERFACE "-fsanitize=address,undefined")
endif()
add_test(incomplete_data cbor11-tests "test_incomplete_data")
add_test(complex cbor11-tests "serialize_deserialize_complex_structure")
install (FILES cbor11.h DESTINATION "include/cbor11")
install (
TARGETS cbor11
EXPORT "cbor11-config"
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)
export(TARGETS cbor11 FILE "cbor11-config.cmake")
install(EXPORT cbor11-config DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cbor11/cmake/")