-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (47 loc) · 1.14 KB
/
CMakeLists.txt
File metadata and controls
57 lines (47 loc) · 1.14 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
cmake_minimum_required(VERSION 3.14)
project(muxi VERSION 0.20260408.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
add_library(muxi
src/auth.cpp
src/transport.cpp
src/server_client.cpp
src/formation_client.cpp
src/errors.cpp
src/webhook.cpp
src/version_check.cpp
)
target_include_directories(muxi
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(muxi
PUBLIC
nlohmann_json::nlohmann_json
CURL::libcurl
OpenSSL::SSL
OpenSSL::Crypto
)
option(MUXI_BUILD_TESTS "Build tests" ON)
if(MUXI_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
install(TARGETS muxi
EXPORT muxiTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(DIRECTORY include/ DESTINATION include)