Skip to content

Commit

Permalink
Install includes to include\${PROJECT_NAME} (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <[email protected]>
  • Loading branch information
sloretz authored Feb 23, 2022
1 parent a545fbe commit 5af2ce3
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions rqt_gui_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,20 @@ find_package(rclcpp REQUIRED)
find_package(qt_gui REQUIRED)
find_package(qt_gui_cpp REQUIRED)

SET(rqt_gui_cpp_SRCS
src/rqt_gui_cpp/nodelet_plugin_provider.cpp
src/rqt_gui_cpp/roscpp_plugin_provider.cpp
)

ament_export_dependencies(
Qt5Widgets
pluginlib
rclcpp
qt_gui_cpp
qt_gui)

include_directories(${PROJECT_NAME}
include
)

add_library(${PROJECT_NAME} SHARED
${rqt_gui_cpp_SRCS}
src/rqt_gui_cpp/nodelet_plugin_provider.cpp
src/rqt_gui_cpp/roscpp_plugin_provider.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")

if(APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
Expand All @@ -62,23 +57,26 @@ ament_target_dependencies(${PROJECT_NAME}

install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)
RUNTIME DESTINATION bin)

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

install(FILES plugin.xml
DESTINATION share/${PROJECT_NAME}
)
pluginlib_export_plugin_description_file(qt_gui "plugin.xml")

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

# Export modern CMake targets
ament_export_targets(export_${PROJECT_NAME})

ament_package()

0 comments on commit 5af2ce3

Please sign in to comment.