contrib: qt: Use the win32-clang-g++ mkspec when building with for windows with clang
authorMartin Storsjö <martin@martin.st>
Wed, 21 Feb 2018 11:26:31 +0000 (13:26 +0200)
committerMartin Storsjö <martin@martin.st>
Sun, 25 Feb 2018 20:18:41 +0000 (22:18 +0200)
Check $(CC) --version to see if it turns out to be clang.

contrib/src/qt/rules.mak

index 13b1545..8e69cad 100644 (file)
@@ -38,8 +38,12 @@ ifdef HAVE_MACOSX
 QT_PLATFORM := -platform darwin-g++
 endif
 ifdef HAVE_WIN32
+ifeq ($(findstring clang, $(shell $(CC) --version)),)
 QT_SPEC := win32-g++
-QT_PLATFORM := -xplatform win32-g++ -device-option CROSS_COMPILE=$(HOST)-
+else
+QT_SPEC := win32-clang-g++
+endif
+QT_PLATFORM := -xplatform $(QT_SPEC) -device-option CROSS_COMPILE=$(HOST)-
 endif
 
 QT_CONFIG := -static -opensource -confirm-license -no-pkg-config \