diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-10-14 17:03:33 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-10-26 16:29:25 +0000 |
commit | 3b447ae1f3b60794bdceaa4c590751a97b43bd1b (patch) | |
tree | 60a548e3154a5209f0a3d780f4c29ad12849c25d | |
parent | 30d02f468fd3d85189c4afc6f84c1015927f43de (diff) | |
download | qtbase-3b447ae1f3b60794bdceaa4c590751a97b43bd1b.tar.gz |
Add qgltf support to qmake
qgltf is a tool provided by the Qt3D module that enables 3D assets to
be defined in qmake project files, and have them converted to an
efficient binary format at build time. The qmake feature will convert
all 3D assets specified by the QT3D_MODELS variable to the qgltf
format and add the new model asset to the project as a Qt resource
file.
Change-Id: If7250d6f23a06254b1ed0e408057723763aad8c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r-- | mkspecs/features/exclusive_builds.prf | 3 | ||||
-rw-r--r-- | mkspecs/features/qgltf.prf | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf index 4d88dcd15e..5d06198ae4 100644 --- a/mkspecs/features/exclusive_builds.prf +++ b/mkspecs/features/exclusive_builds.prf @@ -34,4 +34,5 @@ defineTest(addExclusiveBuilds) { } # Default directories to process -QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR DESTDIR +QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR +QMAKE_DIR_REPLACE_SANE += QGLTF_DIR diff --git a/mkspecs/features/qgltf.prf b/mkspecs/features/qgltf.prf new file mode 100644 index 0000000000..c62e8c2ee8 --- /dev/null +++ b/mkspecs/features/qgltf.prf @@ -0,0 +1,11 @@ +qtPrepareTool(QMAKE_QGLTF, qgltf) + +isEmpty(QGLTF_DIR): QGLTF_DIR = . + +qgltf.input = QT3D_MODELS +qgltf.output = $$QGLTF_DIR/${QMAKE_FILE_BASE}.qrc +qgltf.variable_out += RESOURCES +qgltf.commands = $$QMAKE_QGLTF -d $$QGLTF_DIR $$QGLTF_PARAMS ${QMAKE_FILE_NAME} +silent: qgltf.commands = @echo qgltf ${QMAKE_FILE_IN} && $$qgltf.commands -s +qgltf.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += qgltf |