From 5d7710a623ecde64316c42fd097db386ac28dd51 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Thu, 6 Sep 2018 22:51:06 +0300 Subject: 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 Reviewed-by: Oswald Buddenhagen --- tools/qmlcachegen/qtquickcompiler.prf | 1 + 1 file changed, 1 insertion(+) 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,\.\.,) -- cgit v1.2.3