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>bb10
parent
30d02f468f
commit
3b447ae1f3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue