Merge pull request #54 from Karsten1987/target_include_directories

use target_include_directories
This commit is contained in:
Jonathan Binney 2020-02-04 21:03:43 -08:00 committed by GitHub
commit 8aa0766d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,18 +17,17 @@ find_package(Eigen3 REQUIRED)
# TODO(dhood): enable python support once ported to ROS 2 # TODO(dhood): enable python support once ported to ROS 2
# catkin_python_setup() # catkin_python_setup()
include_directories(include add_library(laser_geometry SHARED src/laser_geometry.cpp)
${rclcpp_INCLUDE_DIRS} target_include_directories(laser_geometry
${sensor_msgs_INCLUDE_DIRS} PUBLIC
${tf2_INCLUDE_DIRS} $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${Eigen3_INCLUDE_DIRS} ${Eigen3_INCLUDE_DIRS}
) )
ament_target_dependencies(laser_geometry
add_library(laser_geometry SHARED src/laser_geometry.cpp) "rclcpp"
target_link_libraries(laser_geometry "sensor_msgs"
${rclcpp_LIBRARIES} "tf2"
${sensor_msgs_LIBRARIES}
${tf2_LIBRARIES}
) )
# Causes the visibility macros to use dllexport rather than dllimport, # Causes the visibility macros to use dllexport rather than dllimport,