From 63d24a746da8d7a07eb2f1367757f24cfb4e9eae Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 8 Jun 2016 16:48:28 +0200 Subject: Copy qmldir file even for prefix builds The qmldir file is needed in the build dir for non-installed static builds, so that qmlimportscanner can work. Change-Id: I9028db6d1e36da5a2be9b0c1ba4c9d475edd5cb5 Task-number: QTBUG-53926 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 05f97a5532..fb006efb65 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -18,10 +18,15 @@ fq_qml_files = $$qmldir_file for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) -qml1_target: \ +load(qt_build_paths) + +qml1_target { + DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH instbase = $$[QT_INSTALL_IMPORTS] -else: \ +} else { + DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH instbase = $$[QT_INSTALL_QML] +} !qml1_target:static: CONFIG += builtin_resources @@ -41,4 +46,11 @@ else: qmldir.files = $$qmldir_file qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir -!prefix_build: COPIES += qmldir +!prefix_build { + COPIES += qmldir +} else { + # For non-installed static builds, qmlimportscanner needs qmldir file in build dir + qmldir2build.files = $$qmldir_file + qmldir2build.path = $$DESTDIR + COPIES += qmldir2build +} -- cgit v1.2.3 From 6cc02ce6c85d3dbd49a55060bd21a8359884786f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 15 Aug 2016 14:42:27 +0200 Subject: Fix qmldir copying in debug and release builds on Windows In a parallel build we may end up copying the qmldir file at the same time, which doesn't work on Windows due to file locking. Apply the same guard for the copying condition as in commit 770a0c91f3fadcdb132d9eb96d085aafbe1bacd0. Change-Id: Ia34395e8654acf192b94e7ea6d0137730e4ea027 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index fb006efb65..6b08ea3a1a 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -46,11 +46,13 @@ else: qmldir.files = $$qmldir_file qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir -!prefix_build { - COPIES += qmldir -} else { - # For non-installed static builds, qmlimportscanner needs qmldir file in build dir - qmldir2build.files = $$qmldir_file - qmldir2build.path = $$DESTDIR - COPIES += qmldir2build +!debug_and_release|!build_all|CONFIG(release, debug|release) { + !prefix_build { + COPIES += qmldir + } else { + # For non-installed static builds, qmlimportscanner needs qmldir file in build dir + qmldir2build.files = $$qmldir_file + qmldir2build.path = $$DESTDIR + COPIES += qmldir2build + } } -- cgit v1.2.3