From 6adaaa77452d8ddc33bcad9a49a2603dc118a1fe Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 25 Oct 2021 20:02:54 +0200 Subject: Add internal property to store Qt namespace In some cases it might be useful to use the value of Qt namespace in CMake files. Currently the value is only stored inside Core target compile definitions. This adds the internal property _qt_namespace to the Core target and exports it. Change-Id: Ic0454f0ce6b8c65b5a186981463d3977169b022e Reviewed-by: Alexandru Croitor --- src/corelib/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index dfeb8132f9..0301acfa97 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -288,6 +288,8 @@ add_dependencies(Core qmodule_pri) if (NOT QT_NAMESPACE STREQUAL "") target_compile_definitions(Core PUBLIC "QT_NAMESPACE=${QT_NAMESPACE}") + set_target_properties(Core PROPERTIES _qt_namespace "${QT_NAMESPACE}") + set_property(TARGET Core APPEND PROPERTY EXPORT_PROPERTIES _qt_namespace) endif() qt_generate_qconfig_cpp(global/qconfig.cpp.in global/qconfig.cpp) -- cgit v1.2.3