diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index 4387bedc447..7213a844f5a 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -134,12 +134,12 @@ if (NOT TARGET Qt5::WinMain) set(_isNotExcluded $>>) set(_isPolicyNEW $) get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS) + set_property(TARGET Qt5::Core APPEND PROPERTY + INTERFACE_LINK_LIBRARIES + $<$:Qt5::WinMain> + ) + # For backward compatibility with CMake < 2.8.12 foreach(_config ${_configs}) - set_property(TARGET Qt5::Core APPEND PROPERTY - INTERFACE_LINK_LIBRARIES - $<$:Qt5::WinMain> - ) - # For backward compatibility with CMake < 2.8.12 set_property(TARGET Qt5::Core APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} $<$:Qt5::WinMain>