aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-09-06 22:51:06 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-10-06 06:49:48 +0000
commit5d7710a623ecde64316c42fd097db386ac28dd51 (patch)
treef5225bbc0b77f83e1a4c676a232f639b83b1c8d8 /tools
parentb22cb209e706317f12416df1a1e8a8a19a271827 (diff)
Fix long file name generated for certain qmlcache.qrc
When compiling qtvirtualkeyboard with MSVC, it may choke on the long file name generated for certain *_qmlcache.qrc files. Specifically, these files are originally generated by qmake, therefore reside in the build directory. For example, this happens when compiling qtvirtualkeyboard out-of-tree using shadow build (e.g. in Qt Creator): qrc____build_qtvirtualkeyboard_Desktop_Qt_5_12_0_MSVC2017_x86_64_Debug_src_virtualkeyboard_.rcc_release_qmake_virtualkeyboard_layouts_qmlcache.cpp c1xx: fatal error C1083: Cannot open source file: '.rcc\release\qrc____build_qtvirtualkeyboard_Desktop_Qt_5_12_0_MSVC2017_x86_64_Debug_src_virtualkeyboard_.rcc_release_qmake_virtualkeyboard_layouts_qmlcache.cpp': No such file or directory This change changes the base directory to $$OUT_PWD for paths which point outside the source directory. Change-Id: I9733af98d916a60ca1ab02cd49ab67024f1db086 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/qtquickcompiler.prf1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf
index 7d8a857847..608b5c9143 100644
--- a/tools/qmlcachegen/qtquickcompiler.prf
+++ b/tools/qmlcachegen/qtquickcompiler.prf
@@ -6,6 +6,7 @@ isEmpty(QMLCACHE_DIR): QMLCACHE_DIR = .
defineReplace(qmlCacheResourceFileOutputName) {
name = $$relative_path($$1, $$_PRO_FILE_PWD_)
+ contains(name, ^\\.\\..*): name = $$relative_path($$1, $$OUT_PWD)
name = $$replace(name,/,_)
name = $$replace(name, \\.qrc$, _qmlcache.qrc)
name = $$replace(name,\.\.,)