PKGBUILDs/qt5-base/mingw-w64-opengl/0022-Adjust-linker-flags-fo...

30 lines
1.0 KiB
Diff
Raw Normal View History

2020-01-28 21:12:38 +01:00
From 37aba0f5c23f1f71126e7472ad54ade6885137dc Mon Sep 17 00:00:00 2001
2017-06-02 18:20:04 +02:00
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 16:42:07 +0200
Subject: [PATCH 22/31] Adjust linker flags for static build with
2017-06-02 18:20:04 +02:00
cmake/mingw-w64
Change-Id: I33b88976d8f5ce87ce431a6f422fe87785bf5b8d
---
src/corelib/Qt5CoreConfigExtras.cmake.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 58d1d5b366..967dc64a19 100644
2017-06-02 18:20:04 +02:00
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -179,3 +179,10 @@ if (ANDROID_PLATFORM)
endif()
2017-06-02 18:20:04 +02:00
_qt5_Core_check_file_exists(${_Qt5CTestMacros})
+
+!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
+# INTERFACE_LINK_LIBRARIES is used to pass a linker flag '-static' and library ws2_32
+set_target_properties(${IMPORTED_TARGET_NAME} PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\")
+unset(_isExe)
+!!ENDIF
--
2020-01-28 21:12:38 +01:00
2.25.0
2017-06-02 18:20:04 +02:00