File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ set(CLASS_LOADER_IGNORE_AMENT FALSE CACHE BOOL
1414 "Do not use ament when building this package." )
1515if (NOT CLASS_LOADER_IGNORE_AMENT)
1616 find_package (ament_cmake)
17+ find_package (ament_cmake_ros REQUIRED)
18+ set (explicit_library_type "" )
19+ else ()
20+ set (explicit_library_type "SHARED" )
1721endif ()
1822
1923find_package (console_bridge_vendor REQUIRED) # Provides console_bridge 0.4.0 on platforms without it.
@@ -33,7 +37,7 @@ set(${PROJECT_NAME}_SRCS
3337 src/meta_object.cpp
3438 src/multi_library_class_loader.cpp
3539)
36- add_library (${PROJECT_NAME} SHARED ${${PROJECT_NAME} _SRCS})
40+ add_library (${PROJECT_NAME} ${explicit_library_type} ${${PROJECT_NAME} _SRCS})
3741target_include_directories (${PROJECT_NAME} PUBLIC
3842 "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>"
3943 "$<INSTALL_INTERFACE:include>" )
Original file line number Diff line number Diff line change 1717 <build_depend >libconsole-bridge-dev</build_depend >
1818
1919 <buildtool_depend >ament_cmake</buildtool_depend >
20+ <buildtool_depend >ament_cmake_ros</buildtool_depend >
2021
2122 <exec_depend >console_bridge_vendor</exec_depend >
2223 <exec_depend >libconsole-bridge-dev</exec_depend >
You can’t perform that action at this time.
0 commit comments