Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install headers to include/${PROJECT_NAME} #86

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ add_library(laser_geometry SHARED src/laser_geometry.cpp)
target_include_directories(laser_geometry
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
${Eigen3_INCLUDE_DIRS}
)
ament_target_dependencies(laser_geometry
Expand All @@ -33,9 +33,13 @@ ament_target_dependencies(laser_geometry
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(laser_geometry PRIVATE "LASER_GEOMETRY_BUILDING_LIBRARY")

ament_export_include_directories(include)
# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
ament_export_libraries(laser_geometry)

# Export modern CMake targets
ament_export_targets(laser_geometry)

ament_export_dependencies(
eigen3_cmake_module
Eigen3
Expand All @@ -55,7 +59,7 @@ install(

install(
DIRECTORY include/
DESTINATION include
DESTINATION include/${PROJECT_NAME}
)

if(BUILD_TESTING)
Expand Down