forked from adafruit/Adafruit_INA228
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
53 lines (42 loc) · 1.05 KB
/
CMakeLists.txt
File metadata and controls
53 lines (42 loc) · 1.05 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
cmake_minimum_required(VERSION 3.8)
project(ina228)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(pluginlib REQUIRED)
find_package(tca9548a REQUIRED)
include_directories(include)
add_library(ina228_driver SHARED
src/Adafruit_INA2xx.cpp
src/Adafruit_INA228.cpp
src/ina228_device.cpp
)
# Use ament_target_dependencies for external ROS packages
ament_target_dependencies(ina228_driver
"rclcpp"
"pluginlib"
"tca9548a"
)
pluginlib_export_plugin_description_file(ina228_driver ina228_plugins.xml)
install(TARGETS ina228_driver
EXPORT ina228_driver_targets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(DIRECTORY include/
DESTINATION include
)
ament_export_targets(ina228_driver_targets
HAS_LIBRARY_TARGET
)
ament_export_dependencies(
rclcpp
pluginlib
tca9548a
)
ament_package()