Skip to content

Commit

Permalink
Enable -fPIC and make a shared library for downstream
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll committed Dec 23, 2021
1 parent b3c672b commit 945d2e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ros_ign_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ add_library(bridge_utils
target_include_directories(bridge_utils
PRIVATE src
)
set_target_properties(bridge_utils PROPERTIES POSITION_INDEPENDENT_CODE ON)

foreach(PKG ${PACKAGES})
add_library(${PKG}_bridge
Expand All @@ -96,6 +97,9 @@ foreach(PKG ${PACKAGES})
ignition-msgs${IGN_MSGS_VER}::core
ignition-transport${IGN_TRANSPORT_VER}::core
)
set_target_properties(${PKG}_bridge
PROPERTIES POSITION_INDEPENDENT_CODE ON)

endforeach()

set(bridge_executables
Expand All @@ -108,6 +112,7 @@ set(bridge_lib
)

add_library(${bridge_lib}
SHARED
src/factories.cpp
)

Expand Down
1 change: 0 additions & 1 deletion ros_ign_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ add_executable(${executable}
)

target_link_libraries(${executable}
${catkin_LIBRARIES}
ignition-msgs${IGN_MSGS_VER}::core
ignition-transport${IGN_TRANSPORT_VER}::core
)
Expand Down

0 comments on commit 945d2e8

Please sign in to comment.