Skip to content

Commit

Permalink
add rpath for simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
yandy committed Feb 23, 2022
1 parent d442903 commit a41357e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ find_package(sensor_msgs REQUIRED)

find_package(sdquadx REQUIRED)

add_library(sdnova_simulation SHARED
add_library(${PROJECT_NAME} SHARED
src/drive.cpp
src/itf.cpp
)
target_include_directories(sdnova_simulation PUBLIC
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(sdnova_simulation sdquadx::sdquadx)
ament_target_dependencies(sdnova_simulation
target_link_libraries(${PROJECT_NAME} sdquadx::sdquadx)
ament_target_dependencies(${PROJECT_NAME}
"gazebo_dev"
"gazebo_ros"
"rclcpp"
Expand All @@ -51,8 +51,11 @@ ament_target_dependencies(sdnova_simulation
"nav_msgs"
"sensor_msgs"
)
set_target_properties(${PROJECT_NAME} PROPERTIES
INSTALL_RPATH_USE_LINK_PATH ON
)
ament_export_libraries(
sdnova_simulation
${PROJECT_NAME}
)
ament_export_include_directories(
include
Expand All @@ -66,7 +69,7 @@ install(
DESTINATION include
)
install(
TARGETS sdnova_simulation
TARGETS ${PROJECT_NAME}
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
Expand Down

0 comments on commit a41357e

Please sign in to comment.