diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/qmake-and-qtpaths-wrapper.bat.in | 2 | ||||
-rwxr-xr-x | bin/qmake-and-qtpaths-wrapper.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 | ||||
-rw-r--r-- | bin/qt-cmake.bat.in | 3 | ||||
-rwxr-xr-x | bin/qt-cmake.in | 2 | ||||
-rwxr-xr-x | bin/qt-cmake.ios.in | 22 | ||||
-rw-r--r-- | bin/qt-configure-module.bat.in | 4 | ||||
-rwxr-xr-x | bin/qt-configure-module.in | 7 |
10 files changed, 69 insertions, 32 deletions
diff --git a/bin/qmake-and-qtpaths-wrapper.bat.in b/bin/qmake-and-qtpaths-wrapper.bat.in index 8225170fc9..5c952b0196 100644 --- a/bin/qmake-and-qtpaths-wrapper.bat.in +++ b/bin/qmake-and-qtpaths-wrapper.bat.in @@ -1,2 +1,2 @@ @echo off -@host_qt_bindir@\@tool_name@.exe -qtconf "%~dp0\target_qt.conf" %* +@host_qt_bindir@\@tool_name@@tool_version@.exe -qtconf "%~dp0\target_qt.conf" %* diff --git a/bin/qmake-and-qtpaths-wrapper.in b/bin/qmake-and-qtpaths-wrapper.in index f26355af8d..bf3d50cc22 100755 --- a/bin/qmake-and-qtpaths-wrapper.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@/@tool_name@ -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/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.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-cmake.ios.in b/bin/qt-cmake.ios.in deleted file mode 100755 index 260da534d3..0000000000 --- a/bin/qt-cmake.ios.in +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# 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 - -# Find the qt toolchain relative to the absolute bin dir path where the script is located. -toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" - -# Specify Xcode as the default generator by assigning it to the CMAKE_GENERATOR env var. -# An explicit -G or -D CMAKE_GENERATOR given on the command line will still take precedence. -export CMAKE_GENERATOR=Xcode - -# Run cmake. -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 10c8ef85fd..26d5c4b051 100644 --- a/bin/qt-configure-module.bat.in +++ b/bin/qt-configure-module.bat.in @@ -19,9 +19,9 @@ if not exist "%module_root%\CMakeLists.txt" ( set cmake_scripts_dir=%script_dir_path%\@__relative_path_to_cmake_scripts_dir@ echo %*>config.opt.in -call "%script_dir_path%"\qt-cmake.bat -DSKIP_ARGS=1 -DIN_FILE=config.opt.in -DOUT_FILE=config.opt ^ +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%" ^ +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 diff --git a/bin/qt-configure-module.in b/bin/qt-configure-module.in index cdd350ea22..1b96f6a862 100755 --- a/bin/qt-configure-module.in +++ b/bin/qt-configure-module.in @@ -1,4 +1,6 @@ #!/bin/sh +set -eu + script_dir_path=`dirname $0` script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` @@ -28,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" |