summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-11-23 21:03:15 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-14 15:46:35 +0000
commit27c07d859a9704bab78b989297b2d9ce5629aeef (patch)
tree17afce16d71ea734b3d842225a2b53e85f0ccfbb
parent825f7fe1d80583fe70c1616e1d3973cc3dc65e7b (diff)
centralize + fix use of system assimp
follow the foo.pri & foo_dependency.pri pattern found in qtbase to de-duplicate the code (and thus implicitly make it consistent) and synchronize the conditionals in the configure test. also document why we still can't enable the assimp sceneparser in all configurations. Change-Id: I3bdc30e077b6c9c7027a9311195c08a6c5f1fcf4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--config.tests/assimp/assimp.pro6
-rw-r--r--src/3rdparty/assimp/assimp_dependency.pri11
-rw-r--r--src/plugins/sceneparsers/assimp/assimp.pro11
-rw-r--r--src/plugins/sceneparsers/sceneparsers.pro2
-rw-r--r--tools/qgltf/qgltf.pro13
5 files changed, 20 insertions, 23 deletions
diff --git a/config.tests/assimp/assimp.pro b/config.tests/assimp/assimp.pro
index 5f022ced4..920c451c4 100644
--- a/config.tests/assimp/assimp.pro
+++ b/config.tests/assimp/assimp.pro
@@ -1,8 +1,8 @@
SOURCES += main.cpp
-LIBS += -lassimp
-
-unix {
+unix:!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
PKGCONFIG += assimp
+} else {
+ LIBS += -lassimp
}
diff --git a/src/3rdparty/assimp/assimp_dependency.pri b/src/3rdparty/assimp/assimp_dependency.pri
new file mode 100644
index 000000000..4fe0df54e
--- /dev/null
+++ b/src/3rdparty/assimp/assimp_dependency.pri
@@ -0,0 +1,11 @@
+config_assimp:!if(cross_compile:host_build) {
+ unix:!contains(QT_CONFIG, no-pkg-config) {
+ CONFIG += link_pkgconfig
+ PKGCONFIG_PRIVATE += assimp
+ } else {
+ LIBS += -lassimp
+ }
+ return()
+} else {
+ include(assimp.pri)
+}
diff --git a/src/plugins/sceneparsers/assimp/assimp.pro b/src/plugins/sceneparsers/assimp/assimp.pro
index 215941071..3660b1f6d 100644
--- a/src/plugins/sceneparsers/assimp/assimp.pro
+++ b/src/plugins/sceneparsers/assimp/assimp.pro
@@ -5,16 +5,7 @@ PLUGIN_TYPE = sceneparsers
PLUGIN_CLASS_NAME = AssimpParserPlugin
load(qt_plugin)
-config_assimp {
- LIBS += -lassimp
-
- unix {
- CONFIG += link_pkgconfig
- PKGCONFIG_PRIVATE += assimp
- }
-} else {
- include(../../../3rdparty/assimp/assimp.pri)
-}
+include(../../../3rdparty/assimp/assimp_dependency.pri)
HEADERS += \
assimphelpers.h \
diff --git a/src/plugins/sceneparsers/sceneparsers.pro b/src/plugins/sceneparsers/sceneparsers.pro
index 9271659db..ccb7a96aa 100644
--- a/src/plugins/sceneparsers/sceneparsers.pro
+++ b/src/plugins/sceneparsers/sceneparsers.pro
@@ -1,3 +1,5 @@
TEMPLATE = subdirs
+# QNX is not supported, and Linux GCC 4.9 on ARM chokes on the assimp
+# sources (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66964).
config_assimp|!cross_compile: SUBDIRS += assimp
SUBDIRS += gltf
diff --git a/tools/qgltf/qgltf.pro b/tools/qgltf/qgltf.pro
index b6aa6f048..de0f1cdd5 100644
--- a/tools/qgltf/qgltf.pro
+++ b/tools/qgltf/qgltf.pro
@@ -3,14 +3,9 @@ option(host_build)
SOURCES = qgltf.cpp
-config_assimp:!cross_compile {
- !contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG_PRIVATE += assimp
- } else {
- LIBS += -lassimp
- }
-} else {
+include(../../src/3rdparty/assimp/assimp_dependency.pri)
+
+force_bootstrap {
# Fix for using bootstrap module on OSX outside of qtbase
contains(QT_CONFIG, qt_framework) {
# Add framework headers directly to make bootstrap lib work
@@ -18,8 +13,6 @@ config_assimp:!cross_compile {
# Extend framework search path to make #include <QtCore/*> work
QMAKE_CXXFLAGS += -F$$QT.core.libs
}
-
- include(../../src/3rdparty/assimp/assimp.pri)
}
load(qt_tool)