From bb5a505d434f2209344b482de45a896bbdbc2077 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Apr 2020 16:10:23 +0200 Subject: [PATCH] CMake/qmake: Fix qtIsPrefixBuild for a CMake-built qtbase In addition to .qmake.cache and .qmake.super we check for the existence of CMakeCache.txt. The top-level non-prefix build part is prospective, but seems plausible. Without this fix, non-prefix qmake builds build libs etc. in the wrong locations, i.e. not in a subdirectory of qtbase. Change-Id: Ic88efa6c772d49ef92713fe640f004c8a5c849d3 Reviewed-by: Alexandru Croitor --- mkspecs/features/qt_prefix_build_check.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_prefix_build_check.prf b/mkspecs/features/qt_prefix_build_check.prf index 3f98847de9..5b21efa367 100644 --- a/mkspecs/features/qt_prefix_build_check.prf +++ b/mkspecs/features/qt_prefix_build_check.prf @@ -12,10 +12,10 @@ defineTest(qtIsPrefixBuild) { prefixdir = $$1 # qtbase non-prefix build? - exists($$prefixdir/.qmake.cache): \ + exists($$prefixdir/.qmake.cache)|exists($$prefixdir/CMakeCache.txt): \ return(false) # top-level non-prefix build? - contains(prefixdir, .*/qtbase):exists($$dirname(prefixdir)/.qmake.super): \ + contains(prefixdir, .*/qtbase):if(exists($$dirname(prefixdir)/.qmake.super)|exists($$dirname(prefixdir)/CMakeCache.txt)): \ return(false) return(true) }