File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -288,17 +288,23 @@ if(GBL_FOUND AND NOT TARGET GBL::GBL)
288288 # As of now, GBL does not provide a cmake target so create a compatibility wrapper
289289 # also GBL_LIBRARIES contains raw linker flags to ROOT we need to filter out
290290 set (GBL_LIBRARIES_FILTERED "" )
291+ set (GBL_LINK_OPTIONS "" )
291292 foreach (_lib IN LISTS GBL_LIBRARIES)
292- if (NOT _lib MATCHES "^-[lL]" )
293- list (APPEND GBL_LIBRARIES_FILTERED "${_lib} " )
294- endif ()
293+ if (_lib MATCHES "^-[lL]" )
294+ continue ()
295+ elseif (_lib MATCHES "^-" )
296+ list (APPEND GBL_LINK_OPTIONS "${_lib} " )
297+ else ()
298+ list (APPEND GBL_LIBRARIES_FILTERED "${_lib} " )
299+ endif ()
295300 endforeach ()
296301 add_library (GBL::GBL INTERFACE IMPORTED )
297302 target_include_directories (GBL::GBL INTERFACE ${GBL_INCLUDE_DIR} )
298303 target_link_libraries (GBL::GBL INTERFACE
299304 ${GBL_LIBRARIES_FILTERED}
300305 Eigen3::Eigen
301306 )
307+ target_link_options (GBL::GBL INTERFACE ${GBL_LINK_OPTIONS} )
302308endif ()
303309
304310feature_summary (WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES )
You can’t perform that action at this time.
0 commit comments