diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-06-10 09:38:21 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-06-13 13:24:19 +0300 |
commit | 87210f0f4ecc22d0faf2a01499ce10cf6defabaf (patch) | |
tree | ff9ff0d211e1e17fe58a7ee2be3ef574fc5e4d5f | |
parent | bb411c301cf02cba89086cee37b89a1963ddc76a (diff) |
Fix editor build on mingw
Editor part.
Task-number: QT3DS-3659
Change-Id: I59a44e72d4de2d68466852dbf86398b42fc8d915
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Jari Karppinen <jari.karppinen@qt.io>
-rw-r--r-- | qt3dstudio.pro | 2 | ||||
-rw-r--r-- | src/Authoring/Client/Code/Core/Utility/cpuid.cpp | 2 | ||||
-rw-r--r-- | src/Authoring/Common/Common.pro | 11 | ||||
-rw-r--r-- | src/Authoring/CoreLib/CoreLib.pro | 12 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/Qt3DStudio.pro | 16 | ||||
-rw-r--r-- | src/commonplatform.pri | 4 | ||||
-rw-r--r-- | src/src.pro | 2 |
7 files changed, 43 insertions, 6 deletions
diff --git a/qt3dstudio.pro b/qt3dstudio.pro index cd964db6..53c06789 100644 --- a/qt3dstudio.pro +++ b/qt3dstudio.pro @@ -26,7 +26,7 @@ load(qt_parts) # Qt3DStudio and Qt3DViewer executables/application bundles are installed to. # The required Qt libraries are copied into that directory/bundles. !build_pass|!debug_and_release { - !mingw:win32|macos { + win32|macos { macos { deploytool = macdeployqt exesuffix = .app diff --git a/src/Authoring/Client/Code/Core/Utility/cpuid.cpp b/src/Authoring/Client/Code/Core/Utility/cpuid.cpp index 3e3ac13a..46149e87 100644 --- a/src/Authoring/Client/Code/Core/Utility/cpuid.cpp +++ b/src/Authoring/Client/Code/Core/Utility/cpuid.cpp @@ -43,7 +43,7 @@ extern "C" { // register set to 80000001h (only applicable to AMD) #define _3DNOW_FEATURE_BIT 0x80000000 -#ifndef _WIN32 +#if !defined(_WIN32) || !defined(_MSC_VER) void __cpuid(int cpuInfo[4], int function_id) { asm volatile diff --git a/src/Authoring/Common/Common.pro b/src/Authoring/Common/Common.pro index e53cd02b..49319021 100644 --- a/src/Authoring/Common/Common.pro +++ b/src/Authoring/Common/Common.pro @@ -13,6 +13,17 @@ contains(QMAKE_TARGET.arch, x86_64) { DEFINES += _AMD64_ } +mingw { +LIBS += \ + -lqt3dsruntimestatic$$qtPlatformTargetSuffix() \ + -lqt3dsqmlstreamer$$qtPlatformTargetSuffix() \ + -lEASTL$$qtPlatformTargetSuffix() \ + -lpcre$$qtPlatformTargetSuffix() \ + -lTinyXML$$qtPlatformTargetSuffix() \ + -lColladaDOM$$qtPlatformTargetSuffix() \ + -lQT3DSDM$$qtPlatformTargetSuffix() +} + INCLUDEPATH += \ Code/_Win32 \ Code/Thread \ diff --git a/src/Authoring/CoreLib/CoreLib.pro b/src/Authoring/CoreLib/CoreLib.pro index c9a4110a..1d64b1da 100644 --- a/src/Authoring/CoreLib/CoreLib.pro +++ b/src/Authoring/CoreLib/CoreLib.pro @@ -17,6 +17,18 @@ contains(QMAKE_TARGET.arch, x86_64) { QT += widgets +mingw { +LIBS += \ + -lqt3dsruntimestatic$$qtPlatformTargetSuffix() \ + -lqt3dsqmlstreamer$$qtPlatformTargetSuffix() \ + -lEASTL$$qtPlatformTargetSuffix() \ + -lpcre$$qtPlatformTargetSuffix() \ + -lTinyXML$$qtPlatformTargetSuffix() \ + -lColladaDOM$$qtPlatformTargetSuffix() \ + -lQT3DSDM$$qtPlatformTargetSuffix() \ + -lCommonLib$$qtPlatformTargetSuffix() +} + macos:DEFINES += WIDE_IS_DIFFERENT_TYPE_THAN_CHAR16_T QT3DS_LITTLE_ENDIAN linux|qnx: DEFINES += WIDE_IS_DIFFERENT_TYPE_THAN_CHAR16_T diff --git a/src/Authoring/Qt3DStudio/Qt3DStudio.pro b/src/Authoring/Qt3DStudio/Qt3DStudio.pro index e4b57494..261842e4 100644 --- a/src/Authoring/Qt3DStudio/Qt3DStudio.pro +++ b/src/Authoring/Qt3DStudio/Qt3DStudio.pro @@ -105,8 +105,20 @@ STATICRUNTIME = \ QMAKE_LFLAGS += $$STATICRUNTIME } else { DEFINES += WIN32_LEAN_AND_MEAN - LIBS += $$STATICRUNTIME - !mingw: QMAKE_LFLAGS += /NODEFAULTLIB:tinyxml.lib + mingw { + LIBS += -lEASTL$$qtPlatformTargetSuffix() \ + -lpcre$$qtPlatformTargetSuffix() \ + -lTinyXML$$qtPlatformTargetSuffix() \ + -lColladaDOM$$qtPlatformTargetSuffix() \ + -lQT3DSDM$$qtPlatformTargetSuffix() \ + -lCommonLib$$qtPlatformTargetSuffix() \ + -lCoreLib$$qtPlatformTargetSuffix() \ + -lqt3dsruntimestatic$$qtPlatformTargetSuffix() \ + } else { + LIBS += $$STATICRUNTIME + QMAKE_LFLAGS += /NODEFAULTLIB:tinyxml.lib + } + } if (qtHaveModule(3dstudio)) { diff --git a/src/commonplatform.pri b/src/commonplatform.pri index 3cdc3cad..6ee5eb6d 100644 --- a/src/commonplatform.pri +++ b/src/commonplatform.pri @@ -266,7 +266,7 @@ android { } win32 { - DEFINES += QT3DS_OS_WINDOWS _WIN32 _PCPLATFORM \ + DEFINES += QT3DS_OS_WINDOWS _PCPLATFORM \ WIDE_IS_DIFFERENT_TYPE_THAN_CHAR16_T KDWIN NOMINMAX win32-msvc { @@ -291,6 +291,8 @@ win32 { contains(QT_ARCH, x86_64) { DEFINES += _WIN64 + } else { + DEFINES += _WIN32 } } diff --git a/src/src.pro b/src/src.pro index 279d386f..81532f12 100644 --- a/src/src.pro +++ b/src/src.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs CONFIG += ordered # When building the desktop authoring tool, skip embedded/mobile targets -!cross_compile:!qnx:!mingw:!android:!ios:!integrity { +!cross_compile:!qnx:!android:!ios:!integrity { SUBDIRS += \ Runtime \ 3rdparty \ |