--- a/src/corelib/Qt5CoreConfigExtras.cmake.in 2019-06-12 23:59:14.000000000 +0300 +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in 2019-06-15 15:36:39.653563500 +0300 @@ -183,6 +183,15 @@ endif() _qt5_Core_check_file_exists(${_Qt5CTestMacros}) + +get_target_property(_libType Qt5::Core TYPE) +if(_libType STREQUAL \"STATIC_LIBRARY\" AND WIN32) + set(_isExe $,EXECUTABLE>) + # INTERFACE_LINK_LIBRARIES is used to pass a linker flag (-static) + # and a library (ws2_32) + set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES \"$<${_isExe}:-static;ws2_32>\") + unset(_isExe) +endif() # Create versionless tool targets. foreach(__qt_tool qmake moc rcc)