AutoGen: Retrieve Qt version from moc as fallback
Consider the case where the find_package call for QtCore is wrapped in a function call. Then AutoGen cannot determine the Qt version, because it only looks at variables and directory properties. The former don't leave the function scope and the latter are not set by default. As a fallback, locate the moc executable via its target and call it with the --version argument to determine the Qt version. Issue: #22028
Showing
- Source/cmQtAutoGenGlobalInitializer.cxx 2 additions, 1 deletionSource/cmQtAutoGenGlobalInitializer.cxx
- Source/cmQtAutoGenInitializer.cxx 72 additions, 2 deletionsSource/cmQtAutoGenInitializer.cxx
- Source/cmQtAutoGenInitializer.h 4 additions, 2 deletionsSource/cmQtAutoGenInitializer.h
- Tests/QtAutogen/Tests.cmake 1 addition, 0 deletionsTests/QtAutogen/Tests.cmake
- Tests/QtAutogen/WrappedFindPackage/CMakeLists.txt 16 additions, 0 deletionsTests/QtAutogen/WrappedFindPackage/CMakeLists.txt
- Tests/QtAutogen/WrappedFindPackage/main.cpp 19 additions, 0 deletionsTests/QtAutogen/WrappedFindPackage/main.cpp
Loading
Please register or sign in to comment