1
0
mirror of synced 2025-02-11 00:03:05 +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() endif()
function(getTarget target type) function(getTarget target type)
get_target_property(TARGET_TYPE ${target} TYPE) get_target_property(IMPORTED_TARGET ${target} IMPORTED)
if (${TARGET_TYPE} STREQUAL "INTERFACE_LIBRARY") if (${IMPORTED_TARGET})
set(${type} INTERFACE PARENT_SCOPE) set(${type} INTERFACE PARENT_SCOPE)
else() else()
set(${type} PRIVATE PARENT_SCOPE) set(${type} PRIVATE PARENT_SCOPE)