Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 3252370d4141b503c561e919316161b8906e2c04 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Fri, 25 Sep 2020 04:26:22 +0000
Subject: [PATCH] features/hlsl_bytecode_header.prf: Use DXSDK_DIR for fxc2
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
features/hlsl_bytecode_header.prf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/features/hlsl_bytecode_header.prf b/features/hlsl_bytecode_header.prf
index 0fa27a75d5..7d05b46637 100644
--- a/features/hlsl_bytecode_header.prf
+++ b/features/hlsl_bytecode_header.prf
@@ -1,7 +1,7 @@
for (SHADER, HLSL_SHADERS) {
INPUT = $$eval($${SHADER}.input)
fxc_$${SHADER}.input = $$INPUT
- fxc_$${SHADER}.commands = fxc.exe /nologo /E $$eval($${SHADER}.entry) /T $$eval($${SHADER}.type) /Fh ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+ fxc_$${SHADER}.commands = "$$(DXSDK_DIR)/fxc2.exe" -nologo -E $$eval($${SHADER}.entry) -T $$eval($${SHADER}.type) -Fh ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
fxc_$${SHADER}.output = $$eval($${SHADER}.header)
fxc_$${SHADER}.dependency_type = TYPE_C
fxc_$${SHADER}.variable_out = HEADERS
--
2.25.1
From 31d6b7c504f4ae0daaed78421c517192dea0016d Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Fri, 25 Sep 2020 03:17:10 +0000
Subject: [PATCH 7/7] qmake: Patch win32-*g++ for static builds
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
mkspecs/win32-clang-g++/qmake.conf | 5 +++++
mkspecs/win32-g++/qmake.conf | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
index 59d42176f0..e919abc7c4 100644
--- a/mkspecs/win32-clang-g++/qmake.conf
+++ b/mkspecs/win32-clang-g++/qmake.conf
@@ -33,3 +33,8 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
load(qt_config)
+
+# [QT-STATIC-PATCH]
+QMAKE_LFLAGS += -static -static-libgcc
+QMAKE_CFLAGS_RELEASE -= -O3
+DEFINES += QT_STATIC_BUILD
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 5de482f23b..58c815a881 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -28,3 +28,8 @@ QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
load(qt_config)
+
+# [QT-STATIC-PATCH]
+QMAKE_LFLAGS += -static -static-libgcc
+QMAKE_CFLAGS_RELEASE -= -O3
+DEFINES += QT_STATIC_BUILD
--
2.25.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment