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>
This commit is contained in:
Lars Knoll 2016-10-25 15:55:07 +02:00
parent 6e8e228852
commit 2ab01d2813
5 changed files with 43 additions and 18 deletions

View File

@ -1,8 +1 @@
SOURCES += main.cpp
unix:qtConfig(pkg-config) {
CONFIG += link_pkgconfig
PKGCONFIG += assimp
} else {
LIBS += -lassimp
}

5
configure.json Normal file
View File

@ -0,0 +1,5 @@
{
"subconfigs": [
"src/core"
]
}

View File

@ -1,8 +1,5 @@
requires(qtConfig(opengl))
load(configure)
qtCompileTest(assimp)
CONFIG += examples_need_tools
load(qt_parts)

View File

@ -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
src/core/configure.json Normal file
View File

@ -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"
]
}
]
}