summaryrefslogtreecommitdiff
path: root/Meta/Lagom/get_linked_lagom_libraries.cmake
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-09-16 03:56:32 -0600
committerTim Flynn <trflynn89@pm.me>2022-09-16 07:48:51 -0400
commitb04de3090f25506c00a1f159dc5d9b211dc839fe (patch)
treec39effe5fcc6a8f82ec480fee25e108ac798e4b6 /Meta/Lagom/get_linked_lagom_libraries.cmake
parentcfa9b44894a793d4011ed380307e6966db555c75 (diff)
downloadserenity-b04de3090f25506c00a1f159dc5d9b211dc839fe.zip
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.
Diffstat (limited to 'Meta/Lagom/get_linked_lagom_libraries.cmake')
-rw-r--r--Meta/Lagom/get_linked_lagom_libraries.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Meta/Lagom/get_linked_lagom_libraries.cmake b/Meta/Lagom/get_linked_lagom_libraries.cmake
index a77928bbfb..1f5a1d3000 100644
--- a/Meta/Lagom/get_linked_lagom_libraries.cmake
+++ b/Meta/Lagom/get_linked_lagom_libraries.cmake
@@ -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")