Skip to content

Commit

Permalink
Convert qt3d to the new configure system
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
laknoll committed Oct 28, 2016
1 parent 6e8e228 commit 2ab01d2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 18 deletions.
7 changes: 0 additions & 7 deletions config.tests/assimp/assimp.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
SOURCES += main.cpp

unix:qtConfig(pkg-config) {
CONFIG += link_pkgconfig
PKGCONFIG += assimp
} else {
LIBS += -lassimp
}
5 changes: 5 additions & 0 deletions configure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"subconfigs": [
"src/core"
]
}
3 changes: 0 additions & 3 deletions qt3d.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
requires(qtConfig(opengl))

load(configure)
qtCompileTest(assimp)

CONFIG += examples_need_tools
load(qt_parts)

Expand Down
11 changes: 3 additions & 8 deletions src/3rdparty/assimp/assimp_dependency.pri
Original file line number Diff line number Diff line change
@@ -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)
}
35 changes: 35 additions & 0 deletions src/core/configure.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}

0 comments on commit 2ab01d2

Please sign in to comment.