summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-06-11 10:01:24 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-06-11 12:18:28 +0300
commita06fe056604b38d52ebca44d52b87f736b483649 (patch)
tree5b9850e93458b78474cad8149c034d0bdf82a408 /src
parent17be624891943ef0f0fd24bf11cb0db23e142878 (diff)
Fix editor build on mingw
Task-number: QT3DS-3659 Change-Id: Ie3f4f9fd6712f858942e9c294a49af2b561bbd77 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/dm/systems/Qt3DSDMStringTable.h1
-rw-r--r--src/foundation/Qt3DSFoundation.cpp9
-rw-r--r--src/foundation/Qt3DSPreprocessor.h17
-rw-r--r--src/ogl-runtime-dylib/ogl-runtime-dylib.pro16
-rw-r--r--src/ogl-runtime-static/ogl-runtime-static.pro11
-rw-r--r--src/viewer/Qt3DSViewerApp.cpp8
6 files changed, 37 insertions, 25 deletions
diff --git a/src/dm/systems/Qt3DSDMStringTable.h b/src/dm/systems/Qt3DSDMStringTable.h
index 7f1e945..fb38b0b 100644
--- a/src/dm/systems/Qt3DSDMStringTable.h
+++ b/src/dm/systems/Qt3DSDMStringTable.h
@@ -31,6 +31,7 @@
#define QT3DS_IMPORT_STRINGTABLE_H
#include <string>
+#include <memory>
#include <EABase/eabase.h>
#include "foundation/Qt3DSPreprocessor.h"
diff --git a/src/foundation/Qt3DSFoundation.cpp b/src/foundation/Qt3DSFoundation.cpp
index 8687cd6..b08ca19 100644
--- a/src/foundation/Qt3DSFoundation.cpp
+++ b/src/foundation/Qt3DSFoundation.cpp
@@ -44,6 +44,15 @@
#ifdef _WIN32
#pragma warning(disable : 4996) // intentionally suppressing this warning message
#endif
+
+namespace qt3ds {
+void Qt3DSAssert(const char *exp, const char *file, int line, bool *ignore)
+{
+ Q_UNUSED(ignore)
+ qCritical() << "Assertion thrown: " << file << " " << line << " " << exp;
+}
+}
+
namespace qt3ds {
namespace foundation {
using namespace intrinsics;
diff --git a/src/foundation/Qt3DSPreprocessor.h b/src/foundation/Qt3DSPreprocessor.h
index 371d3e6..98b60c6 100644
--- a/src/foundation/Qt3DSPreprocessor.h
+++ b/src/foundation/Qt3DSPreprocessor.h
@@ -175,29 +175,20 @@ static linking
no definition - this will allow DLLs and libraries to use the exported API from PhysXCommon
*/
+#include <qglobal.h>
#if defined(QT3DS_WINDOWS) && !defined(__CUDACC__)
#if defined QT3DS_FOUNDATION_EXPORTS
-#define QT3DS_FOUNDATION_API __declspec(dllexport)
+#define QT3DS_FOUNDATION_API Q_DECL_EXPORT
#elif defined QT3DS_FOUNDATION_NO_EXPORTS
#define QT3DS_FOUNDATION_API
#else
-#define QT3DS_FOUNDATION_API __declspec(dllimport)
+#define QT3DS_FOUNDATION_API Q_DECL_IMPORT
#endif
#else
#define QT3DS_FOUNDATION_API
#endif
-
-#if defined(QT3DS_AUTOTESTS_ENABLED)
-#include <qglobal.h>
-#if defined(QT3DS_BUILDING_LIBRARY)
-#define QT3DS_AUTOTEST_EXPORT Q_DECL_EXPORT
-#else
-#define QT3DS_AUTOTEST_EXPORT Q_DECL_IMPORT
-#endif
-#else
-#define QT3DS_AUTOTEST_EXPORT
-#endif
+#define QT3DS_AUTOTEST_EXPORT QT3DS_FOUNDATION_API
/**
Calling convention
diff --git a/src/ogl-runtime-dylib/ogl-runtime-dylib.pro b/src/ogl-runtime-dylib/ogl-runtime-dylib.pro
index 6cafa4c..264830f 100644
--- a/src/ogl-runtime-dylib/ogl-runtime-dylib.pro
+++ b/src/ogl-runtime-dylib/ogl-runtime-dylib.pro
@@ -28,7 +28,7 @@ HEADERS += \
../viewer/Qt3DSViewerApp.h \
../viewer/Qt3DSViewerTimer.h
-linux|qnx|mingw {
+linux|qnx {
BEGIN_ARCHIVE = -Wl,--whole-archive
END_ARCHIVE = -Wl,--no-whole-archive
}
@@ -46,9 +46,17 @@ STATICRUNTIME = \
QMAKE_LFLAGS += $$STATICRUNTIME
LIBS += -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
} else {
- LIBS += \
- $$STATICRUNTIME \
- -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
+ mingw {
+ LIBS += \
+ -lqt3dsruntimestatic$$qtPlatformTargetSuffix() \
+ -lEASTL$$qtPlatformTargetSuffix() \
+ -lQT3DSDM$$qtPlatformTargetSuffix() \
+ -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
+ } else {
+ LIBS += \
+ $$STATICRUNTIME \
+ -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
+ }
}
win32 {
diff --git a/src/ogl-runtime-static/ogl-runtime-static.pro b/src/ogl-runtime-static/ogl-runtime-static.pro
index 8b2c95a..09b6c89 100644
--- a/src/ogl-runtime-static/ogl-runtime-static.pro
+++ b/src/ogl-runtime-static/ogl-runtime-static.pro
@@ -17,6 +17,17 @@ DEFINES += QT3DS_BUILDING_LIBRARY DISABLE_MESH_OPTIMIZATION
QT += qml
QT += quick-private
+mingw {
+ win32 {
+ LIBS += \
+ -lWs2_32 \
+ }
+ LIBS += \
+ -lEASTL$$qtPlatformTargetSuffix() \
+ -lQT3DSDM$$qtPlatformTargetSuffix() \
+ -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
+}
+
# Foundation
SOURCES += \
../foundation/ConvertUTF.cpp \
diff --git a/src/viewer/Qt3DSViewerApp.cpp b/src/viewer/Qt3DSViewerApp.cpp
index 3199124..2180caf 100644
--- a/src/viewer/Qt3DSViewerApp.cpp
+++ b/src/viewer/Qt3DSViewerApp.cpp
@@ -48,14 +48,6 @@
#include <mach-o/dyld.h>
#endif
-namespace qt3ds {
-void Qt3DSAssert(const char *exp, const char *file, int line, bool *ignore)
-{
- Q_UNUSED(ignore)
- qCritical() << "Assertion thrown: " << file << " " << line << " " << exp;
-}
-}
-
#ifndef EASTL_DEBUG_BREAK
void EASTL_DEBUG_BREAK()
{