Skip to content

Commit

Permalink
Merge pull request #1106 from Naoki-Hiraoka/PR-rtmbuild
Browse files Browse the repository at this point in the history
[rtmbuild] fix include/link path for openhrp3 (by ishiguroJSK)
  • Loading branch information
k-okada authored Dec 23, 2021
2 parents c5b5e47 + a8dfbe7 commit d99980f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rtmbuild/cmake/rtmbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ macro(rtmbuild_init)
rosbuild_gensrv()
endif()

include_directories(${catkin_INCLUDE_DIRS} ${openrtm_aist_INCLUDE_DIRS} ${openhrp3_INCLUDE_DIRS})
include_directories( ${openhrp3_INCLUDE_DIRS} ${openrtm_aist_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
# since catkin > 0.7.0, the CPATH is no longer being set by catkin, so rtmbuild manually add them
set(_cmake_prefix_path_tmp $ENV{CMAKE_PREFIX_PATH})
string(REPLACE ":" ";" _cmake_prefix_path_tmp ${_cmake_prefix_path_tmp})
foreach(_cmake_prefix_path ${_cmake_prefix_path_tmp})
include_directories(${_cmake_prefix_path}/include)
endforeach()

link_directories(${catkin_LIBRARY_DIRS} ${openrtm_aist_LIBRARY_DIRS} ${openhrp3_LIBRARY_DIRS})
link_directories(${openhrp3_LIBRARY_DIRS} ${openrtm_aist_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})

endmacro(rtmbuild_init)

Expand Down Expand Up @@ -308,7 +308,7 @@ macro(rtmbuild_add_executable exe)
set_target_properties(${exe} PROPERTIES COMPILE_FLAGS "-Wno-deprecated")
##
add_dependencies(${exe} RTMBUILD_${PROJECT_NAME}_genbridge ${${_package}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} )
target_link_libraries(${exe} ${catkin_LIBRARIES} ${openrtm_aist_LIBRARIES} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS} )
target_link_libraries(${exe} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS} ${openrtm_aist_LIBRARIES} ${catkin_LIBRARIES} )
endmacro(rtmbuild_add_executable)

macro(rtmbuild_add_library lib)
Expand All @@ -318,6 +318,6 @@ macro(rtmbuild_add_library lib)
else()
rosbuild_add_library(${ARGV})
endif()
target_link_libraries(${lib} ${openrtm_aist_LIBRARIES} ${openhrp3_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS})
target_link_libraries(${lib} ${openhrp3_LIBRARIES} ${openrtm_aist_LIBRARIES} ${${PROJECT_NAME}_IDLLIBRARY_DIRS})
endmacro(rtmbuild_add_library)

0 comments on commit d99980f

Please sign in to comment.