1
0
mirror of synced 2025-02-10 15:52:59 +01:00

build: Apply flags correctly for imported libraries

This commit is contained in:
WerWolv 2025-02-02 20:50:49 +01:00
parent 5ee2ebfb4f
commit be40fd9563

View File

@ -11,8 +11,8 @@ if (POLICY CMP0177)
endif()
function(getTarget target type)
get_target_property(TARGET_TYPE ${target} TYPE)
if (${TARGET_TYPE} STREQUAL "INTERFACE_LIBRARY")
get_target_property(IMPORTED_TARGET ${target} IMPORTED)
if (${IMPORTED_TARGET})
set(${type} INTERFACE PARENT_SCOPE)
else()
set(${type} PRIVATE PARENT_SCOPE)