summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-10-25 15:55:07 +0200
committerLars Knoll <lars.knoll@qt.io>2016-10-28 11:01:38 +0000
commit2ab01d2813c8823877019ea41349d037e5c29024 (patch)
tree328baf5a54bf6d665107c9effe3a73b5bba695b9
parent6e8e228852f0930638b0e0272509809a0fb9ab42 (diff)
Convert qt3d to the new configure system
Remove some duplicated code between the assimp test and assimp_dependency.pri and do all pkg-config related tests during config time. Change-Id: If97c4cf53cd0356e7ee4e618a8d645ea697b3dfc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--config.tests/assimp/assimp.pro7
-rw-r--r--configure.json5
-rw-r--r--qt3d.pro3
-rw-r--r--src/3rdparty/assimp/assimp_dependency.pri11
-rw-r--r--src/core/configure.json35
5 files changed, 43 insertions, 18 deletions
diff --git a/config.tests/assimp/assimp.pro b/config.tests/assimp/assimp.pro
index 712986c17..28dcadcbf 100644
--- a/config.tests/assimp/assimp.pro
+++ b/config.tests/assimp/assimp.pro
@@ -1,8 +1 @@
SOURCES += main.cpp
-
-unix:qtConfig(pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += assimp
-} else {
- LIBS += -lassimp
-}
diff --git a/configure.json b/configure.json
new file mode 100644
index 000000000..40d6bfe56
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,5 @@
+{
+ "subconfigs": [
+ "src/core"
+ ]
+}
diff --git a/qt3d.pro b/qt3d.pro
index 83e0ffcaf..2cc347a1c 100644
--- a/qt3d.pro
+++ b/qt3d.pro
@@ -1,8 +1,5 @@
requires(qtConfig(opengl))
-load(configure)
-qtCompileTest(assimp)
-
CONFIG += examples_need_tools
load(qt_parts)
diff --git a/src/3rdparty/assimp/assimp_dependency.pri b/src/3rdparty/assimp/assimp_dependency.pri
index f1a109f10..8ba2d9a41 100644
--- a/src/3rdparty/assimp/assimp_dependency.pri
+++ b/src/3rdparty/assimp/assimp_dependency.pri
@@ -1,11 +1,6 @@
-config_assimp:!if(cross_compile:host_build) {
- unix:qtConfig(pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG_PRIVATE += assimp
- } else {
- LIBS += -lassimp
- }
- return()
+QT_FOR_CONFIG += 3dcore-private
+qtConfig(system-assimp):!if(cross_compile:host_build) {
+ QMAKE_USE_PRIVATE += assimp
} else {
include(assimp.pri)
}
diff --git a/src/core/configure.json b/src/core/configure.json
new file mode 100644
index 000000000..b1c173cc3
--- /dev/null
+++ b/src/core/configure.json
@@ -0,0 +1,35 @@
+{
+ "module": "3dcore",
+ "testDir": "../../config.tests",
+
+ "libraries": {
+ "assimp": {
+ "label": "Assimp",
+ "test": "assimp",
+ "sources": [
+ { "type": "pkgConfig", "args": "assimp" },
+ "-lassimp"
+ ]
+ }
+ },
+
+ "features": {
+ "system-assimp": {
+ "label": "System Assimp",
+ "condition": "libs.assimp",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "report": [
+ ],
+
+ "summary": [
+ {
+ "section": "Qt 3D",
+ "entries": [
+ "system-assimp"
+ ]
+ }
+ ]
+}