Skip to content

Commit b04de30

Browse files
ADKastertrflynn89
authored andcommitted
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.
1 parent cfa9b44 commit b04de30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Meta/Lagom/get_linked_lagom_libraries.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ function(get_linked_lagom_libraries_impl target output)
1111
return()
1212
endif()
1313

14+
get_target_property(target_is_imported "${target}" IMPORTED)
15+
if (target_is_imported)
16+
return()
17+
endif()
18+
1419
get_target_property(target_type "${target}" TYPE)
1520

1621
if ("${target_type}" STREQUAL "SHARED_LIBRARY")

0 commit comments

Comments
 (0)