summaryrefslogtreecommitdiffstats
path: root/bin/qt-cmake.in
blob: 5203e49f878c5c446f7f3cb7d3c1f2cf70872fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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"; 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.
CMAKE_TOOLCHAIN_FILE="$toolchain_path"
export CMAKE_TOOLCHAIN_FILE

exec "$cmake_path" @__qt_cmake_extra@ "$@"