Skip to content

Commit

Permalink
Install headers into subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Nov 27, 2024
1 parent d4b3e07 commit c4b637c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ set(THIS_PACKAGE_EXPORT_DEPENDS
# Set VERSION from package.xml
ament_package_xml()

include_directories(include)

add_library(${PROJECT_NAME} SHARED
src/aabb.cpp
src/bodies.cpp
Expand All @@ -89,6 +87,9 @@ add_library(${PROJECT_NAME} SHARED
)
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
target_compile_options(${PROJECT_NAME} PRIVATE ${PROJECT_COMPILE_OPTIONS})
target_include_directories(${PROJECT_NAME}
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>)
target_link_libraries(${PROJECT_NAME} fcl)
ament_target_dependencies(${PROJECT_NAME}
${THIS_PACKAGE_EXPORT_DEPENDS}
Expand Down Expand Up @@ -117,7 +118,7 @@ install(
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(DIRECTORY include/ DESTINATION include)
install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})

ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_EXPORT_DEPENDS})
Expand Down

0 comments on commit c4b637c

Please sign in to comment.