Autogen: Add CMAKE_AUTO*_EXECUTABLE variables
Description
This MR adds the CMAKE_AUTOMOC_EXECUTABLE
, CMAKE_AUTOUIC_EXECUTABLE
, and CMAKE_AUTORCC_EXECUTABLE
global CMake
variables. When Qt is added to CMake, Autogen executables check whether the global CMAKE_AUTO*_EXECUTABLEs
exist. If they exist, AUTO*_EXECUTABLE
initialize with the corresponding global values.
Build
rm -rf build && cmake -S . -B build/ -DCMake_TEST_Qt6=ON -DCMAKE_PREFIX_PATH=<Qt path> && cmake --build build/ --parallel
Test
A new test case GlobalMocExecutables
was added to test these new variables. The below commands can be run to try them.
ctest --test-dir build/ -R Qt5Autogen.GlobalAutogenExecutable -V
ctest --test-dir build/ -R Qt6Autogen.GlobalAutogenExecutable -V
Fixes: #20071 (closed)
Topic-rename: autogen-exe-vars
Edited by Brad King