diff --git a/modules/find/FindMorseCommon.cmake b/modules/find/FindMorseCommon.cmake index 26f0411c8bd6781718c75232ee83ba43a4940334..663df04dc64bcdfe56b65de5f5b2a53f6ac0061b 100644 --- a/modules/find/FindMorseCommon.cmake +++ b/modules/find/FindMorseCommon.cmake @@ -202,6 +202,21 @@ macro(morse_export_imported_target namespace1 namespace2 targetname cmakesubdir) get_target_property(_LIBRARIES ${namespace1}::${namespace2} INTERFACE_LINK_LIBRARIES) get_target_property(_CFLAGS ${namespace1}::${namespace2} INTERFACE_COMPILE_OPTIONS) get_target_property(_LDFLAGS ${namespace1}::${namespace2} INTERFACE_LINK_OPTIONS) + if (NOT _INCLUDES) + set(_INCLUDES "") + endif() + if (NOT _LIBDIRS) + set(_LIBDIRS "") + endif() + if (NOT _LIBRARIES) + set(_LIBRARIES "") + endif() + if (NOT _CFLAGS) + set(_CFLAGS "") + endif() + if (NOT _LDFLAGS) + set(_LDFLAGS "") + endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${targetname}Targets.cmake" "add_library(${namespace1}::${namespace2} INTERFACE IMPORTED)