Skip to content

Commit fb1eda9

Browse files
authored
Always symlink TARGET_{LINKER,SONAME}_FILE on libraries (#535)
During non-symlink install, these files are copied to the install prefix by default. We should do the same for symlink installs if they're specified. Signed-off-by: Scott K Logan <[email protected]>
1 parent 8b92e4a commit fb1eda9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in

+4
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ function(ament_cmake_symlink_install_targets)
228228
"unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}")
229229
endif()
230230

231+
list(REVERSE ARG_TARGET_FILES)
232+
list(REMOVE_DUPLICATES ARG_TARGET_FILES)
233+
list(REVERSE ARG_TARGET_FILES)
234+
231235
# iterate over target files
232236
foreach(file ${ARG_TARGET_FILES})
233237
if(NOT IS_ABSOLUTE "${file}")

ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ function(ament_cmake_symlink_install_targets)
7474
endif()
7575
list(APPEND target_files "$<TARGET_FILE:${target}>")
7676
get_target_property(target_type "${target}" TYPE)
77-
if(WIN32 AND "${target_type}" STREQUAL "SHARED_LIBRARY")
77+
if("${target_type}" STREQUAL "SHARED_LIBRARY")
78+
if(NOT WIN32)
79+
list(APPEND target_files "$<TARGET_SONAME_FILE:${target}>")
80+
endif()
7881
list(APPEND target_files "$<TARGET_LINKER_FILE:${target}>")
7982
endif()
8083
if("${target_type}" STREQUAL "INTERFACE_LIBRARY")

0 commit comments

Comments
 (0)