diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 04c2cc1881..ab73d8b98c 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -618,29 +618,16 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_journald PkgConfig::Libsystemd ) -# special case begin -add_library(Core_versiontagging OBJECT - global/qversiontagging.cpp global/qversiontagging.h -) - -set_target_properties(Core_versiontagging PROPERTIES - COMPILE_OPTIONS $ - COMPILE_DEFINITIONS $ - INCLUDE_DIRECTORIES $ -) +set(core_version_tagging_files global/qversiontagging.cpp global/qversiontagging.h) +target_sources(Core PRIVATE ${core_version_tagging_files}) # Disable LTO, as the symbols disappear somehow under GCC # (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200) if(GCC AND FEATURE_ltcg) - target_compile_options(Core_versiontagging PRIVATE "-fno-lto") + set_source_files_properties(${core_version_tagging_files} + PROPERTIES COMPILE_OPTIONS "-fno-lto") endif() -qt_internal_extend_target(Core - SOURCES - $ -) -# special case end - qt_internal_extend_target(Core CONDITION UNIX SOURCES io/qfilesystemengine_unix.cpp