diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-10-25 20:02:54 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-10-26 19:20:47 +0200 |
commit | 6adaaa77452d8ddc33bcad9a49a2603dc118a1fe (patch) | |
tree | 9bef30a408ef14842825d2350a1c3cf0e1a582e8 | |
parent | f670e483c15c8b27db2bf40eadce86d3f735dc46 (diff) |
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 <alexandru.croitor@qt.io>
-rw-r--r-- | src/corelib/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
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) |