CMake: export Qt6 setting to the config file

This commit is contained in:
Adriaan de Groot 2023-09-03 13:56:37 +02:00
parent cbdd3fc928
commit 953479422c
2 changed files with 13 additions and 5 deletions

View File

@ -421,6 +421,7 @@ endif()
# when building out-of-tree. # when building out-of-tree.
set(Calamares_WITH_PYTHON ${WITH_PYTHON}) set(Calamares_WITH_PYTHON ${WITH_PYTHON})
set(Calamares_WITH_QML ${WITH_QML}) set(Calamares_WITH_QML ${WITH_QML})
set(Calamares_WITH_QT6 ${WITH_QT6})
### Transifex Translation status ### Transifex Translation status
# #

View File

@ -46,11 +46,18 @@ macro(accumulate_deps outvar target namespace)
endforeach() endforeach()
endmacro() endmacro()
# Qt5 infrastructure for translations is required set(Calamares_WITH_QT6 @WITH_QT6@)
set(qt5_required Core Widgets LinguistTools) if(Calamares_WITH_QT6)
accumulate_deps(qt5_required Calamares::calamares Qt5::) set(qtname "Qt6")
accumulate_deps(qt5_required Calamares::calamaresui Qt5::) else()
find_package(Qt5 CONFIG REQUIRED ${qt5_required}) set(qtname "Qt5")
endif()
# Qt infrastructure for translations is required
set(qt_required Core Widgets LinguistTools)
accumulate_deps(qt_required Calamares::calamares ${qtname}::)
accumulate_deps(qt_required Calamares::calamaresui ${qtname}::)
find_package(${qtname} CONFIG REQUIRED ${qt_required})
set(kf5_required "") set(kf5_required "")
accumulate_deps(kf5_required Calamares::calamares KF5::) accumulate_deps(kf5_required Calamares::calamares KF5::)