On systems that do not follow the Filesystem Hierarchy Standard, such as guix, the hardcoded `/bin/pwd` will fail to be found so that the script will fail. Use `pwd`, instead, so that the command can be found through the normal path search mechanism. Change-Id: Ib5480aeda5ca9d241286be6d1f95e9a0810476a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
39 lines
939 B
Bash
Executable File
39 lines
939 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
script_dir_path=`dirname $0`
|
|
script_dir_path=`(cd "$script_dir_path"; pwd)`
|
|
|
|
printUsage()
|
|
{
|
|
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
|
|
printUsage
|
|
exit 1
|
|
fi
|
|
module_root=$1
|
|
shift
|
|
|
|
if [ ! -f "$module_root/CMakeLists.txt" ]; then
|
|
echo >&2 "Error: $module_root is not a valid Qt module source directory."
|
|
printUsage
|
|
exit 1
|
|
fi
|
|
|
|
optfile=config.opt
|
|
echo > "$optfile"
|
|
for arg in "$@"; do
|
|
echo "$arg" >> "$optfile"
|
|
done
|
|
|
|
cmake_script_path="$script_dir_path/@__relative_path_to_cmake_scripts_dir@/QtProcessConfigureArgs.cmake"
|
|
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"
|