From bc0f5f5d1afd2cdd8737030fc2f07d2be81d9363 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 11 Aug 2020 19:20:10 +0200 Subject: [PATCH] CMake: Expose public info about whether Qt is a shared lib build We expose it in the private QtBuildInternals package, but we need it also as public information for consumption in qt_import_qml_plugins() to decide whether it should do anything. Change-Id: If135ae596b4edaf8e2c458f6a2518b968c6d01c4 Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- cmake/QtHostInfoConfig.cmake.in | 1 + src/corelib/Qt6CoreConfigExtras.cmake.in | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/QtHostInfoConfig.cmake.in b/cmake/QtHostInfoConfig.cmake.in index cec9552c77..7933b8b500 100644 --- a/cmake/QtHostInfoConfig.cmake.in +++ b/cmake/QtHostInfoConfig.cmake.in @@ -19,3 +19,4 @@ set(@var_prefix@QMAKE_MKSPEC "@QT_QMAKE_TARGET_MKSPEC@") set(@var_prefix@ARCH "@TEST_architecture_arch@") set(@var_prefix@SUBARCHS "@TEST_subarch_result@") set(@var_prefix@BUILDABI "@TEST_buildAbi@") +set(@var_prefix@IS_SHARED_LIBS_BUILD "@BUILD_SHARED_LIBS@") diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in index 5601bf1660..d9a1469e88 100644 --- a/src/corelib/Qt6CoreConfigExtras.cmake.in +++ b/src/corelib/Qt6CoreConfigExtras.cmake.in @@ -42,6 +42,7 @@ set(QT@PROJECT_VERSION_MAJOR@_INSTALL_PLUGINS "@INSTALL_PLUGINSDIR@") set(QT@PROJECT_VERSION_MAJOR@_INSTALL_QML "@INSTALL_QMLDIR@") set(QT@PROJECT_VERSION_MAJOR@_INSTALL_TESTS "@INSTALL_TESTSDIR@") set(QT@PROJECT_VERSION_MAJOR@_INSTALL_TRANSLATIONS "@INSTALL_TRANSLATIONSDIR@") +set(QT@PROJECT_VERSION_MAJOR@_IS_SHARED_LIBS_BUILD "@BUILD_SHARED_LIBS@") get_filename_component(_Qt6CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH) set(_Qt6CTestMacros "${_Qt6CoreConfigDir}/Qt6CTestMacros.cmake")