Install config.opt and config.summary files in top-level prefix builds

Assuming the DATADIR is a good destination for these files. The behavior
is disabled by default, set QT_INSTALL_CONFIG_INFO_FILES to TRUE to
enable it.

Task-number: QTBUG-78749
Change-Id: Ief81b856265ad028714e1d6651239c05aed1a5c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-04-10 14:45:42 +02:00
parent f16b504596
commit fccc64fc4f

View File

@ -74,6 +74,15 @@ macro(qt_internal_top_level_end)
# Depends on QtBuildInternalsConfig being included, which is the case whenver any repo is
# configured.
qt_internal_qt_configure_end()
if(QT_WILL_INSTALL AND QT_INSTALL_CONFIG_INFO_FILES)
qt_install(
FILES
"${CMAKE_BINARY_DIR}/config.opt"
"${CMAKE_BINARY_DIR}/config.summary"
DESTINATION ${INSTALL_DATADIR}
)
endif()
endmacro()
function(qt_internal_print_top_level_info)