-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (29 loc) · 1.45 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
cmake_minimum_required(VERSION 3.10.2)
project(cpu_temperature_diagnostics)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_library(REQUIRED libsensors)
find_package(catkin REQUIRED COMPONENTS diagnostic_updater roscpp)
catkin_package(INCLUDE_DIRS include CATKIN_DEPENDS roscpp)
# ##############################################################################
# Build ##
# ##############################################################################
add_executable(
${PROJECT_NAME}_node
src/main.cc src/sensor_chip.cc src/temperature_feature.cc
src/cpu_temperature_diagnostic.cc)
target_include_directories(${PROJECT_NAME}_node PRIVATE include)
target_include_directories(${PROJECT_NAME}_node SYSTEM
PRIVATE ${catkin_INCLUDE_DIRS})
target_compile_options(${PROJECT_NAME}_node PRIVATE -Wall -Wextra -pedantic
-Werror)
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} sensors)
# ##############################################################################
# Install ##
# ##############################################################################
install(TARGETS ${PROJECT_NAME}_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})