2020-08-31 08:38:53 +00:00
|
|
|
@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
|
2020-10-21 08:57:49 +00:00
|
|
|
set module_root=%module_root:\=/%
|
2020-08-31 08:38:53 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2020-10-29 09:22:03 +00:00
|
|
|
set cmake_scripts_dir=%script_dir_path%\@__relative_path_to_cmake_scripts_dir@
|
2021-08-20 12:34:37 +00:00
|
|
|
echo %*>config.opt.in
|
|
|
|
call "%script_dir_path%"\qt-cmake.bat -DSKIP_ARGS=1 -DIN_FILE=config.opt.in -DOUT_FILE=config.opt ^
|
|
|
|
-P "%cmake_scripts_dir%\QtWriteArgsFile.cmake"
|
2020-08-31 08:38:53 +00:00
|
|
|
call "%script_dir_path%"\qt-cmake-private.bat -DOPTFILE=config.opt -DMODULE_ROOT="%module_root%" ^
|
|
|
|
-DCMAKE_COMMAND="%script_dir_path%\qt-cmake-private.bat" ^
|
2020-10-29 09:22:03 +00:00
|
|
|
-P "%cmake_scripts_dir%\QtProcessConfigureArgs.cmake"
|
2020-08-31 08:38:53 +00:00
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:print_usage
|
|
|
|
echo Usage: qt-configure-module ^<module-source-dir^> [options]
|
2021-08-20 11:01:00 +00:00
|
|
|
echo.
|
|
|
|
echo To display the available options for a Qt module, run
|
|
|
|
echo qt-configure-module ^<module-source-dir^> -help
|
2020-08-31 08:38:53 +00:00
|
|
|
goto :eof
|