-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (32 loc) · 1.05 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
# drivebrain core library
cmake_minimum_required(VERSION 3.24)
project(drivebrain_core LANGUAGES CXX C)
find_package(nlohmann_json REQUIRED)
find_package(Boost REQUIRED COMPONENTS system program_options)
find_package(hytech_np_proto_cpp CONFIG REQUIRED)
find_package(drivebrain_core_msgs_proto_cpp CONFIG REQUIRED)
find_package(cmake_macros REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
add_library(drivebrain_core SHARED
src/JsonFileHandler.cpp
src/Configurable.cpp
src/Logger.cpp)
target_include_directories(drivebrain_core PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_link_libraries(drivebrain_core PUBLIC
nlohmann_json::nlohmann_json
Boost::boost
Boost::system
drivebrain_core_msgs_proto_cpp::drivebrain_core_msgs_proto_cpp
hytech_np_proto_cpp::hytech_np_proto_cpp
spdlog::spdlog
)
include(create_package)
make_cmake_package(drivebrain_core drivebrain_core)
install(
DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
)