aboutsummarylogtreecommitdiffstats
path: root/qt5-win32-static-cmake-link-ws2_32-and--static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'qt5-win32-static-cmake-link-ws2_32-and--static.patch')
-rw-r--r--qt5-win32-static-cmake-link-ws2_32-and--static.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/qt5-win32-static-cmake-link-ws2_32-and--static.patch b/qt5-win32-static-cmake-link-ws2_32-and--static.patch
new file mode 100644
index 000000000000..be20044903f1
--- /dev/null
+++ b/qt5-win32-static-cmake-link-ws2_32-and--static.patch
@@ -0,0 +1,15 @@
+--- src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2014-11-09 00:54:20.852201500 +0000
++++ src/corelib/Qt5CoreConfigExtras.cmake.in 2014-11-09 00:55:52.437439900 +0000
+@@ -165,3 +165,12 @@
+ set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\")
+
+ _qt5_Core_check_file_exists(${_Qt5CTestMacros})
++
++get_target_property(_libType Qt5::Core TYPE)
++if(_libType STREQUAL \"STATIC_LIBRARY\" AND WIN32)
++ set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
++ # INTERFACE_LINK_LIBRARIES is used to pass a linker flag (-static)
++ # and a library (ws2_32)
++ set_target_properties(Qt5::Core PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\")
++ unset(_isExe)
++endif()