CMake: Set some additional info variables in Qt6CoreConfigExtras
Add info whether Qt was an infix built, and whether the reduce_exports feature was enabled. These variable were set before in Qt5CoreConfigExtras.cmake. Change-Id: Id077763cfffd5ee6f1a7a28d04cf92dc46390c54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
parent
c6a5cdcee6
commit
28ed9e3e2d
@ -427,6 +427,20 @@ function(qt_internal_add_module target)
|
||||
list(APPEND extra_cmake_includes "${INSTALL_CMAKE_NAMESPACE}${target}Macros.cmake")
|
||||
endif()
|
||||
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigExtras.cmake.in")
|
||||
if(target STREQUAL Core)
|
||||
set(extra_cmake_code "")
|
||||
# Add some variables for compatibility with Qt5 config files.
|
||||
if(QT_FEATURE_reduce_exports)
|
||||
string(APPEND qtcore_extra_cmake_code "
|
||||
set(QT_VISIBILITY_AVAILABLE TRUE)")
|
||||
endif()
|
||||
if(QT_LIBINFIX)
|
||||
string(APPEND qtcore_extra_cmake_code "
|
||||
set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigExtras.cmake.in"
|
||||
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigExtras.cmake"
|
||||
@ONLY)
|
||||
|
@ -49,6 +49,8 @@ set(_Qt6CTestMacros "${_Qt6CoreConfigDir}/Qt6CTestMacros.cmake")
|
||||
|
||||
_qt_internal_setup_startup_target()
|
||||
|
||||
@qtcore_extra_cmake_code@
|
||||
|
||||
if(ANDROID_PLATFORM)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@QT_CMAKE_EXPORT_NAMESPACE@AndroidMacros.cmake")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user