qt5base-lts/bin/qt-configure-module.bat.in
Joerg Bornemann de3bd64425 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>
2020-10-30 08:22:26 +01:00

40 lines
1.0 KiB
Batchfile

@echo off
setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
set script_dir_path=%~dp0
set script_dir_path=%script_dir_path:~0,-1%
if "%1" == "" (
call :print_usage
exit /b 1
)
set module_root=%1
set module_root=%module_root:\=/%
shift
if not exist "%module_root%\CMakeLists.txt" (
echo Error: %module_root% is not a valid Qt module source directory. >&2
call :print_usage
exit /b 1
)
echo. > "config.opt"
set first_iteration=indeed
for %%a in (%*) do (
if defined first_iteration (
:: Drop the first argument, which is the module root.
set first_iteration=
) else (
echo %%a >> "config.opt"
)
)
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_scripts_dir%\QtProcessConfigureArgs.cmake"
goto :eof
:print_usage
echo Usage: qt-configure-module ^<module-source-dir^> [options]
goto :eof