From 3b447ae1f3b60794bdceaa4c590751a97b43bd1b Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Wed, 14 Oct 2015 17:03:33 +0200 Subject: 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 --- mkspecs/features/exclusive_builds.prf | 3 ++- mkspecs/features/qgltf.prf | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 mkspecs/features/qgltf.prf (limited to 'mkspecs/features') 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 -- cgit v1.2.3 From d020e0781cf8647d87f7088350e40adf4f0cf8fe Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 22 Oct 2015 11:31:58 -0700 Subject: Workaround: don't create ELF version scripts for Android Somehow qmake doesn't add the correct rules for the Android makefiles, so the build fails when cross-compiling from Windows. The reason for that is unknown (could be related to that "qt_android_deps" config, but that isn't used anywhere in qmake or the buildsystem). This isn't likely to be a problem, since there are no global installs of Qt on Android. Change-Id: I1d0f78915b5942aab07cffff140f95ce32324030 Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 10911fa6df..193629b532 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -187,6 +187,8 @@ equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):compiler_support QMAKE_CXXFLAGS += -mfpmath=sse } +android: CONFIG += qt_android_deps no_linker_version_script + unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { verscript = $$OUT_PWD/$${TARGET}.version QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript @@ -226,8 +228,6 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { unset(verscript_content) } -android: CONFIG += qt_android_deps - #install directives load(qt_installs) -- cgit v1.2.3