Skip to content

Commit

Permalink
Always symlink TARGET_{LINKER,SONAME}_FILE on libraries (#535)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cottsay authored Nov 14, 2024
1 parent 8b92e4a commit fb1eda9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ function(ament_cmake_symlink_install_targets)
"unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}")
endif()

list(REVERSE ARG_TARGET_FILES)
list(REMOVE_DUPLICATES ARG_TARGET_FILES)
list(REVERSE ARG_TARGET_FILES)

# iterate over target files
foreach(file ${ARG_TARGET_FILES})
if(NOT IS_ABSOLUTE "${file}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ function(ament_cmake_symlink_install_targets)
endif()
list(APPEND target_files "$<TARGET_FILE:${target}>")
get_target_property(target_type "${target}" TYPE)
if(WIN32 AND "${target_type}" STREQUAL "SHARED_LIBRARY")
if("${target_type}" STREQUAL "SHARED_LIBRARY")
if(NOT WIN32)
list(APPEND target_files "$<TARGET_SONAME_FILE:${target}>")
endif()
list(APPEND target_files "$<TARGET_LINKER_FILE:${target}>")
endif()
if("${target_type}" STREQUAL "INTERFACE_LIBRARY")
Expand Down

0 comments on commit fb1eda9

Please sign in to comment.