diff --git a/CMLibCommonTargetProperties.cmake b/CMLibCommonTargetProperties.cmake index 3e5f1b5..79e1364 100644 --- a/CMLibCommonTargetProperties.cmake +++ b/CMLibCommonTargetProperties.cmake @@ -7,6 +7,15 @@ function(common_target_properties target) set(__interface 1) set(__visibility INTERFACE) endif() + + get_target_property(__sources ${target} SOURCES) + foreach(__src IN LISTS __sources) + string(REGEX MATCH ".*/qrc_.*\\.cpp$" __qrc ${__src}) + if (__qrc) + set_property(SOURCE ${__qrc} PROPERTY COTIRE_EXCLUDED ON) + endif() + endforeach() + target_compile_features(${target} ${__visibility} ${COMMON_CXX_FEATURES}) get_target_property(_targetType ${target} TYPE) if(_targetType STREQUAL "EXECUTABLE" AND CMAKE_CXX_COMPILE_OPTIONS_PIE)