qtbase/bin/qt-cmake.in
Alexandru Croitor 990b60120e cmake: Override generator for iOS projects to Xcode in qt-cmake.in
Instead of maintaining a separate qt-cmake.ios.in wrapper script that
can easily diverge from qt-cmake.in

Change-Id: I53f4eac02188be89a4c11b3e71cde04ac2a24b51
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-18 22:34:48 +01:00

20 lines
727 B
Bash
Executable File

#!/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
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@ "$@"