summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-10-29 10:22:03 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-10-30 08:22:26 +0100
commitde3bd644259b134d68414dcb8479f66f2f39fe70 (patch)
treedf4f5eebc591b3a8f283580a469a748357bfb403
parent3afd06cd43d78ef0992eaa6a458572eea6769297 (diff)
CMake: Prepare configure/qt-configure-module for calling more scripts
In a subsequent change we will call another CMake script from qt-configure-module.bat. Write the location of qtbase/cmake into the generated scripts instead of the path to QtProcessConfigureArgs.cmake. Change-Id: Ie333b16d310b215c6e49efa27740c7525453d28f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--bin/qt-configure-module.bat.in4
-rwxr-xr-xbin/qt-configure-module.in2
-rw-r--r--cmake/QtWrapperScriptHelpers.cmake11
3 files changed, 8 insertions, 9 deletions
diff --git a/bin/qt-configure-module.bat.in b/bin/qt-configure-module.bat.in
index 72d3a460bf..a4858d412c 100644
--- a/bin/qt-configure-module.bat.in
+++ b/bin/qt-configure-module.bat.in
@@ -28,10 +28,10 @@ for %%a in (%*) do (
)
)
-set cmake_script_path=%script_dir_path%\@__relative_path_to_processconfigureargs_script@
+set cmake_scripts_dir=%script_dir_path%\@__relative_path_to_cmake_scripts_dir@
call "%script_dir_path%"\qt-cmake-private.bat -DOPTFILE=config.opt -DMODULE_ROOT="%module_root%" ^
-DCMAKE_COMMAND="%script_dir_path%\qt-cmake-private.bat" ^
- -P "%cmake_script_path%"
+ -P "%cmake_scripts_dir%\QtProcessConfigureArgs.cmake"
goto :eof
:print_usage
diff --git a/bin/qt-configure-module.in b/bin/qt-configure-module.in
index e102c0927b..f337f40b8c 100755
--- a/bin/qt-configure-module.in
+++ b/bin/qt-configure-module.in
@@ -26,5 +26,5 @@ for arg in "$@"; do
echo $arg >> "$optfile"
done
-cmake_script_path="$script_dir_path/@__relative_path_to_processconfigureargs_script@"
+cmake_script_path="$script_dir_path/@__relative_path_to_cmake_scripts_dir@/QtProcessConfigureArgs.cmake"
"$script_dir_path/qt-cmake-private" -DOPTFILE=$optfile -DMODULE_ROOT="$module_root" -DCMAKE_COMMAND="$script_dir_path/qt-cmake-private" -P "$cmake_script_path"
diff --git a/cmake/QtWrapperScriptHelpers.cmake b/cmake/QtWrapperScriptHelpers.cmake
index 581fd3c6d8..31abfca8b1 100644
--- a/cmake/QtWrapperScriptHelpers.cmake
+++ b/cmake/QtWrapperScriptHelpers.cmake
@@ -41,15 +41,14 @@ function(qt_internal_create_wrapper_scripts)
# Provide a script to configure Qt modules.
if(QT_WILL_INSTALL)
- set(__relative_path_to_processconfigureargs_script
+ set(__relative_path_to_cmake_scripts_dir
"${__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir}")
else()
- file(RELATIVE_PATH __relative_path_to_processconfigureargs_script
+ file(RELATIVE_PATH __relative_path_to_cmake_scripts_dir
"${__qt_bin_dir_absolute}" "${CMAKE_CURRENT_LIST_DIR}")
endif()
- string(APPEND __relative_path_to_processconfigureargs_script "/QtProcessConfigureArgs.cmake")
- file(TO_NATIVE_PATH "${__relative_path_to_processconfigureargs_script}"
- __relative_path_to_processconfigureargs_script)
+ file(TO_NATIVE_PATH "${__relative_path_to_cmake_scripts_dir}"
+ __relative_path_to_cmake_scripts_dir)
if(CMAKE_HOST_UNIX)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/qt-configure-module.in"
"${QT_BUILD_DIR}/${INSTALL_BINDIR}/qt-configure-module" @ONLY)
@@ -61,7 +60,7 @@ function(qt_internal_create_wrapper_scripts)
qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_BINDIR}/qt-configure-module.bat"
DESTINATION "${INSTALL_BINDIR}")
endif()
- unset(__relative_path_to_processconfigureargs_script)
+ unset(__relative_path_to_cmake_scripts_dir)
# Provide a private convenience wrapper to configure and build one or more standalone tests.
# Calling CMake directly on a Qt test project won't work because the project does not call