diff --git a/bin/qt-configure-module.bat.in b/bin/qt-configure-module.bat.in index c9631110178..10c8ef85fda 100644 --- a/bin/qt-configure-module.bat.in +++ b/bin/qt-configure-module.bat.in @@ -28,4 +28,7 @@ goto :eof :print_usage echo Usage: qt-configure-module ^ [options] +echo. +echo To display the available options for a Qt module, run +echo qt-configure-module ^ -help goto :eof diff --git a/bin/qt-configure-module.in b/bin/qt-configure-module.in index f337f40b8c2..cdd350ea228 100755 --- a/bin/qt-configure-module.in +++ b/bin/qt-configure-module.in @@ -4,7 +4,12 @@ script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` printUsage() { - echo 'Usage: qt-configure-module [options]' + cat < [options] + +To display the available options for a Qt module, run +qt-configure-module -help +EOF } if [ "$#" -lt 1 ]; then diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 024925435ed..e9aa7d32590 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -71,6 +71,8 @@ while(NOT "${configure_args}" STREQUAL "") set(auto_detect_compiler FALSE) elseif(arg STREQUAL "-list-features") set(list_features TRUE) + elseif(arg MATCHES "^-h(elp)?$") + set(display_module_help TRUE) elseif(arg STREQUAL "-write-options-for-conan") list(POP_FRONT configure_args options_json_file) elseif(arg STREQUAL "-skip") @@ -439,6 +441,26 @@ function(qt_call_function func) endif() endfunction() +if(display_module_help) + message([[ +Options: + -help, -h ............ Display this help screen + + -feature- ... Enable + -no-feature- Disable [none] + -list-features ....... List available features. Note that some features + have dedicated command line options as well. +]]) + + set(help_file "${MODULE_ROOT}/config_help.txt") + if(EXISTS "${help_file}") + file(READ "${help_file}" content) + message("${content}") + endif() + + return() +endif() + if(list_features) unset(lines) foreach(feature ${commandline_known_features})