From 4a7310348298089837f70c434788cdb83928ccbb Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Thu, 1 Aug 2019 17:28:48 -0500 Subject: [PATCH] Fix interface targets that do not have libraries (#1013) --- cmake/catkin_libraries.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/catkin_libraries.cmake b/cmake/catkin_libraries.cmake index 814eb4349..0b090ca61 100644 --- a/cmake/catkin_libraries.cmake +++ b/cmake/catkin_libraries.cmake @@ -137,8 +137,10 @@ function(catkin_replace_imported_library_targets VAR) get_target_property(${lib}_imported ${lib} IMPORTED) if(${${lib}_type} STREQUAL "INTERFACE_LIBRARY") get_target_property(${lib}_interface_link_libraries ${lib} INTERFACE_LINK_LIBRARIES) - catkin_replace_imported_library_targets(${lib}_resolved_libs ${${lib}_interface_link_libraries}) - list(APPEND result ${${lib}_resolved_libs}) + if(${${lib}_interface_link_libraries}) + catkin_replace_imported_library_targets(${lib}_resolved_libs ${${lib}_interface_link_libraries}) + list(APPEND result ${${lib}_resolved_libs}) + endif() elseif(${${lib}_imported}) set(imported_libraries) # empty list get_target_property(${lib}_imported_location ${lib} IMPORTED_LOCATION)