@@ -104,6 +104,17 @@ macro(get_standalone_dependencies _library_name)
104
104
endif ()
105
105
endif ()
106
106
107
+ # If library is msgs, fetch all targets to get libraries for dynamic type support
108
+ # Those libraries are not listed in <XX>_LIBRARIES (which stands for libraries to link against to use <XX>)
109
+ if (${_library_name} MATCHES ".*\_ msgs$" )
110
+ foreach (entry ${${_library_name} _TARGETS})
111
+ fetch_target_lib(${entry} )
112
+ string (REGEX REPLACE "::" "_" entry_normalized ${entry} )
113
+ list (APPEND REQ_STANDALONE_LIBS
114
+ ${${entry_normalized} _LIB_PATH})
115
+ endforeach ()
116
+ endif ()
117
+
107
118
# Get spdlog and dependency
108
119
if (UNIX AND "${_library_name} " STREQUAL "spdlog" )
109
120
include (${${_library_name} _CONFIG})
@@ -148,8 +159,9 @@ macro(install_standalone_dependencies)
148
159
string (REGEX REPLACE "\. lib$" ".dll" dll_path ${bin_path} )
149
160
list (APPEND REQ_STANDALONE_DLLS ${dll_path} )
150
161
endforeach ()
162
+ list (REMOVE_DUPLICATES REQ_STANDALONE_DLLS)
151
163
install (FILES ${REQ_STANDALONE_DLLS}
152
- DESTINATION ${INSTALL_DESTINATION_DIR}
164
+ DESTINATION ${INSTALL_DESTINATION_DIR}
153
165
)
154
166
elseif (UNIX )
155
167
set (_resolvedFiles "" )
@@ -160,7 +172,7 @@ macro(install_standalone_dependencies)
160
172
endforeach ()
161
173
162
174
install (FILES ${_resolvedFiles}
163
- DESTINATION ${INSTALL_DESTINATION_DIR}
175
+ DESTINATION ${INSTALL_DESTINATION_DIR}
164
176
)
165
177
166
178
# Fix soversion files
0 commit comments