diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/qmake-and-qtpaths-wrapper.bat.in | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/qmake-and-qtpaths-wrapper.in (renamed from bin/qmake-wrapper-for-target.in) | 2 | ||||
-rw-r--r-- | bin/qmake-wrapper-for-target.bat.in | 2 | ||||
-rw-r--r-- | bin/qt-cmake-create.bat.in | 19 | ||||
-rwxr-xr-x | bin/qt-cmake-create.in | 29 | ||||
-rw-r--r-- | bin/qt-cmake-private-install.cmake.in | 11 | ||||
-rwxr-xr-x | bin/qt-cmake-standalone-test.in | 2 | ||||
-rw-r--r-- | bin/qt-cmake.bat.in | 3 | ||||
-rwxr-xr-x | bin/qt-cmake.in | 2 | ||||
-rw-r--r-- | bin/qt-configure-module.bat.in | 10 | ||||
-rwxr-xr-x | bin/qt-configure-module.in | 14 |
11 files changed, 82 insertions, 14 deletions
diff --git a/bin/qmake-and-qtpaths-wrapper.bat.in b/bin/qmake-and-qtpaths-wrapper.bat.in new file mode 100644 index 0000000000..5c952b0196 --- /dev/null +++ b/bin/qmake-and-qtpaths-wrapper.bat.in @@ -0,0 +1,2 @@ +@echo off +@host_qt_bindir@\@tool_name@@tool_version@.exe -qtconf "%~dp0\target_qt.conf" %* diff --git a/bin/qmake-wrapper-for-target.in b/bin/qmake-and-qtpaths-wrapper.in index 265ce760de..bf3d50cc22 100644..100755 --- a/bin/qmake-wrapper-for-target.in +++ b/bin/qmake-and-qtpaths-wrapper.in @@ -4,4 +4,4 @@ script_dir_path=`dirname $0` script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` -@host_qt_bindir@/qmake -qtconf "$script_dir_path/target_qt.conf" $* +@host_qt_bindir@/@tool_name@@tool_version@ -qtconf "$script_dir_path/target_qt.conf" $* diff --git a/bin/qmake-wrapper-for-target.bat.in b/bin/qmake-wrapper-for-target.bat.in deleted file mode 100644 index 8df27eaa44..0000000000 --- a/bin/qmake-wrapper-for-target.bat.in +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -@host_qt_bindir@\qmake.exe -qtconf "%~dp0\target_qt.conf" %* diff --git a/bin/qt-cmake-create.bat.in b/bin/qt-cmake-create.bat.in new file mode 100644 index 0000000000..97faad8db7 --- /dev/null +++ b/bin/qt-cmake-create.bat.in @@ -0,0 +1,19 @@ +@echo off +setlocal +:: The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory. +set script_dir_path=%~dp0 + +:: Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. +set cmake_path=@CMAKE_COMMAND@ +if not exist "%cmake_path%" set cmake_path=cmake + +if NOT "%~2" == "" goto :showhelp +if NOT "%~1" == "" (set PROJECT_DIR=%~1) else (set PROJECT_DIR=%cd%) + +"%cmake_path%" -DPROJECT_DIR="%PROJECT_DIR%" -P "%script_dir_path%\@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@\QtInitProject.cmake" +exit /b %errorlevel% + +:showhelp +echo Usage +echo. qt-cmake-create <path/to/project> +exit /b 1 diff --git a/bin/qt-cmake-create.in b/bin/qt-cmake-create.in new file mode 100755 index 0000000000..7865d0fe91 --- /dev/null +++ b/bin/qt-cmake-create.in @@ -0,0 +1,29 @@ +#!/bin/sh + +HELP_MESSAGE="Usage + qt-cmake-create <path/to/project>" + +# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory. +script_dir_path=`dirname $0` +script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` + +# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. +original_cmake_path="@CMAKE_COMMAND@" +cmake_path=$original_cmake_path +if ! test -f "$cmake_path"; then + cmake_path="cmake" +fi + +if [ "$#" -gt 1 ]; then + echo "Invalid number of arguments" + echo "$HELP_MESSAGE" + exit 1 +fi + +if [ "$#" -gt 0 ]; then + PROJECT_DIR=$1 +else + PROJECT_DIR=$PWD +fi +exec "$cmake_path" -DPROJECT_DIR="$PROJECT_DIR" -P \ + "$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/QtInitProject.cmake" diff --git a/bin/qt-cmake-private-install.cmake.in b/bin/qt-cmake-private-install.cmake.in index 19dddd4fcb..71a94e190d 100644 --- a/bin/qt-cmake-private-install.cmake.in +++ b/bin/qt-cmake-private-install.cmake.in @@ -5,13 +5,18 @@ # https://gitlab.kitware.com/cmake/cmake/-/issues/20713 # https://gitlab.kitware.com/cmake/cmake/-/issues/21475 set(configs "@__qt_configured_configs@") +set(should_skip_strip "@__qt_skip_strip_installed_artifacts@") + if(NOT QT_BUILD_DIR) message(FATAL_ERROR "No QT_BUILD_DIR value provided to qt-cmake-private-install.") endif() -unset(strip_arg) -if ("x@MSVC@" STREQUAL "x") - set(strip_arg --strip) + +if(should_skip_strip) + unset(strip_arg) +else() + set(strip_arg --strip) endif() + foreach(config ${configs}) message(STATUS "Installing configuration: '${config}'") set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" ${strip_arg}) diff --git a/bin/qt-cmake-standalone-test.in b/bin/qt-cmake-standalone-test.in index d13c3eee40..b0fbea5ded 100755 --- a/bin/qt-cmake-standalone-test.in +++ b/bin/qt-cmake-standalone-test.in @@ -1,4 +1,4 @@ @__qt_cmake_standalone_test_os_prelude@ @__qt_cmake_standalone_test_script_relpath@ -@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@ +@__qt_cmake_private_relpath@ @__qt_cmake_standalone_test_relpath@ -DQT_BUILD_STANDALONE_TESTS=ON -DQT_STANDALONE_TEST_PATH=@__qt_cmake_standalone_passed_args@ diff --git a/bin/qt-cmake.bat.in b/bin/qt-cmake.bat.in index 2645c0320f..5d831ebce9 100644 --- a/bin/qt-cmake.bat.in +++ b/bin/qt-cmake.bat.in @@ -1,4 +1,5 @@ @echo off +setlocal :: The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory. set script_dir_path=%~dp0 @@ -6,5 +7,5 @@ set script_dir_path=%~dp0 set cmake_path=@CMAKE_COMMAND@ if not exist "%cmake_path%" set cmake_path=cmake -set toolchain_path=%script_dir_path%/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake +set toolchain_path=%script_dir_path%\@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@\qt.toolchain.cmake "%cmake_path%" -DCMAKE_TOOLCHAIN_FILE="%toolchain_path%" @__qt_cmake_extra@ %* diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in index f719257f60..14de927c3a 100755 --- a/bin/qt-cmake.in +++ b/bin/qt-cmake.in @@ -13,5 +13,7 @@ fi toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" +@extra_qt_cmake_code@ + # Find the qt toolchain relative to the absolute bin dir path where the script is located. exec "$cmake_path" -DCMAKE_TOOLCHAIN_FILE="$toolchain_path" @__qt_cmake_extra@ "$@" diff --git a/bin/qt-configure-module.bat.in b/bin/qt-configure-module.bat.in index 9d9243f5b8..26d5c4b051 100644 --- a/bin/qt-configure-module.bat.in +++ b/bin/qt-configure-module.bat.in @@ -18,13 +18,17 @@ if not exist "%module_root%\CMakeLists.txt" ( ) set cmake_scripts_dir=%script_dir_path%\@__relative_path_to_cmake_scripts_dir@ -call "%script_dir_path%"\qt-cmake.bat -DSKIP_ARGS=1 -DOUT_FILE=config.opt ^ - -P "%cmake_scripts_dir%\QtWriteArgsFile.cmake" %* -call "%script_dir_path%"\qt-cmake-private.bat -DOPTFILE=config.opt -DMODULE_ROOT="%module_root%" ^ +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" +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] +echo. +echo To display the available options for a Qt module, run +echo qt-configure-module ^<module-source-dir^> -help goto :eof diff --git a/bin/qt-configure-module.in b/bin/qt-configure-module.in index f337f40b8c..1b96f6a862 100755 --- a/bin/qt-configure-module.in +++ b/bin/qt-configure-module.in @@ -1,10 +1,17 @@ #!/bin/sh +set -eu + script_dir_path=`dirname $0` script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` printUsage() { - echo 'Usage: qt-configure-module <module-source-dir> [options]' + cat <<EOF +Usage: qt-configure-module <module-source-dir> [options] + +To display the available options for a Qt module, run +qt-configure-module <module-source-dir> -help +EOF } if [ "$#" -lt 1 ]; then @@ -23,8 +30,9 @@ fi optfile=config.opt echo > "$optfile" for arg in "$@"; do -echo $arg >> "$optfile" +echo "$arg" >> "$optfile" done 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" +qt_cmake_private_path="$script_dir_path/../libexec" +"$qt_cmake_private_path/qt-cmake-private" -DOPTFILE=$optfile -DMODULE_ROOT="$module_root" -DCMAKE_COMMAND="$qt_cmake_private_path/qt-cmake-private" -P "$cmake_script_path" |