summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-04-26 15:45:29 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-04-26 23:11:28 +0200
commitadf29329ead34e4fa805ef19370b2e5172bd61e0 (patch)
treecc9fd378c2748b5ef302912dcc0f41ab85b82eae /libexec
parentd81a9206ac528ad7b5093305d7fe0037053468b8 (diff)
downloadqtbase-adf29329ead34e4fa805ef19370b2e5172bd61e0.tar.gz
CMake: Make qt-internal-configure-tests relocatable
It's important for conan CI builds where the correct installation location of Qt should be used when configuring standalone tests. Task-number: QTBUG-93037 Change-Id: I2465a439aea6826dedfb3217d1c909ad639d4ac0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'libexec')
-rw-r--r--libexec/qt-internal-configure-tests.bat.in9
-rwxr-xr-xlibexec/qt-internal-configure-tests.in6
2 files changed, 13 insertions, 2 deletions
diff --git a/libexec/qt-internal-configure-tests.bat.in b/libexec/qt-internal-configure-tests.bat.in
new file mode 100644
index 0000000000..dd2b0cc9c4
--- /dev/null
+++ b/libexec/qt-internal-configure-tests.bat.in
@@ -0,0 +1,9 @@
+@echo off
+setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
+set script_dir_path=%~dp0
+set script_dir_path=%script_dir_path:~0,-1%
+
+set cmake_scripts_dir=%script_dir_path%
+
+call "%script_dir_path%"\"@relative_path_from_libexec_dir_to_bin_dir@"\qt-cmake.bat ^
+ @script_passed_args@ %*
diff --git a/libexec/qt-internal-configure-tests.in b/libexec/qt-internal-configure-tests.in
index 396cda7bf8..d0bf333ee6 100755
--- a/libexec/qt-internal-configure-tests.in
+++ b/libexec/qt-internal-configure-tests.in
@@ -1,3 +1,5 @@
-@script_os_prelude@
+#!/bin/sh
+script_dir_path=`dirname $0`
+script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
-@qt_cmake_path@ @script_passed_args@
+"$script_dir_path/@relative_path_from_libexec_dir_to_bin_dir@/qt-cmake" @script_passed_args@ "$@"