Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
avoid using build time Connext library paths, determine them when dow…
Browse files Browse the repository at this point in the history
…nstream packages are built (#385) (#433)

* avoid using build time Connext library paths, determine them when downstream packages are built

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* same fix for definitions and include dirs

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* Add missing export include (#386)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

* keep original location of function call

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
  • Loading branch information
dirk-thomas and ivanpauno committed Jul 1, 2020
1 parent b1062f9 commit 250842e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 31 deletions.
2 changes: 1 addition & 1 deletion rmw_connext_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()

ament_package(CONFIG_EXTRAS "${PROJECT_NAME}-extras.cmake")
ament_package()

install(
DIRECTORY include/
Expand Down
26 changes: 0 additions & 26 deletions rmw_connext_cpp/rmw_connext_cpp-extras.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion rmw_connext_dynamic_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if(Connext_GLIBCXX_USE_CXX11_ABI_ZERO)
target_compile_definitions(rmw_connext_dynamic_cpp
PRIVATE Connext_GLIBCXX_USE_CXX11_ABI_ZERO)
endif()
ament_export_libraries(rmw_connext_dynamic_cpp ${Connext_LIBRARIES})
ament_export_libraries(rmw_connext_dynamic_cpp)

# On Windows this adds the RMW_BUILDING_DLL definition.
# On Unix (GCC or Clang) it hides the symbols by default with -fvisibility=hidden.
Expand Down
5 changes: 2 additions & 3 deletions rmw_connext_shared_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ find_package(rmw REQUIRED)

include_directories(include)

ament_export_definitions(${Connext_DEFINITIONS})
ament_export_include_directories(include ${Connext_INCLUDE_DIRS})
ament_export_include_directories(include)

ament_export_dependencies(rmw)

Expand Down Expand Up @@ -62,7 +61,7 @@ ament_target_dependencies(rmw_connext_shared_cpp
"rcutils"
"rmw"
"Connext")
ament_export_libraries(rmw_connext_shared_cpp ${Connext_LIBRARIES})
ament_export_libraries(rmw_connext_shared_cpp)

if(WIN32)
# Causes the visibility macros to use dllexport rather than dllimport
Expand Down
13 changes: 13 additions & 0 deletions rmw_connext_shared_cpp/rmw_connext_shared_cpp-extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@

include(
"${rmw_connext_shared_cpp_DIR}/get_rmw_connext_output_filter.cmake")

find_package(connext_cmake_module QUIET)
find_package(Connext MODULE QUIET)

if(NOT Connext_FOUND)
message(STATUS
"Could not find RTI Connext - skipping rmw_connext_shared_cpp")
set(rmw_connext_shared_cpp_FOUND FALSE)
else()
list(APPEND rmw_connext_shared_cpp_DEFINITIONS ${Connext_DEFINITIONS})
list(APPEND rmw_connext_shared_cpp_INCLUDE_DIRS ${Connext_INCLUDE_DIRS})
list(APPEND rmw_connext_shared_cpp_LIBRARIES ${Connext_LIBRARIES})
endif()

0 comments on commit 250842e

Please sign in to comment.