Lagom: Skip IMPORTED targets in get_linked_lagom_libraries

This script is useful when wanting to install lagom libraries for
projects using Lagom via FetchContent, but trips over itself if the
project links other non-Lagom imported targets to itself. So, let's just
skip them.
This commit is contained in:
Andrew Kaster 2022-09-16 03:56:32 -06:00 committed by Tim Flynn
parent cfa9b44894
commit b04de3090f

View file

@ -11,6 +11,11 @@ function(get_linked_lagom_libraries_impl target output)
return()
endif()
get_target_property(target_is_imported "${target}" IMPORTED)
if (target_is_imported)
return()
endif()
get_target_property(target_type "${target}" TYPE)
if ("${target_type}" STREQUAL "SHARED_LIBRARY")