2020-08-31 08:38:53 +00:00
|
|
|
#!/bin/sh
|
2022-06-02 14:08:16 +00:00
|
|
|
set -eu
|
|
|
|
|
2020-08-31 08:38:53 +00:00
|
|
|
script_dir_path=`dirname $0`
|
|
|
|
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
|
|
|
|
|
|
|
|
printUsage()
|
|
|
|
{
|
2021-08-20 11:01:00 +00:00
|
|
|
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
|
2020-08-31 08:38:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2020-10-21 14:25:14 +00:00
|
|
|
echo > "$optfile"
|
2020-08-31 08:38:53 +00:00
|
|
|
for arg in "$@"; do
|
2022-06-02 14:08:16 +00:00
|
|
|
echo "$arg" >> "$optfile"
|
2020-08-31 08:38:53 +00:00
|
|
|
done
|
|
|
|
|
2020-10-29 09:22:03 +00:00
|
|
|
cmake_script_path="$script_dir_path/@__relative_path_to_cmake_scripts_dir@/QtProcessConfigureArgs.cmake"
|
2022-12-12 14:08:41 +00:00
|
|
|
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"
|