summaryrefslogtreecommitdiffstats
path: root/src/window-lib
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2022-06-29 14:19:07 +0200
committerRobert Griebl <robert.griebl@qt.io>2022-06-30 12:26:04 +0000
commita1c90ed4605b08c39d380d2605d26b684d340c64 (patch)
tree8b76a66bd594abb02e9801858d0168f90efcbdef /src/window-lib
parent0b895aa93688926781e30fa5400832396e9c8bef (diff)
Prevent linking of AppMan modules into user plugins
As the AppMan modules are static libraries, linking any of them into a QML plugin (that later gets loaded into the system-ui) will lead to a bunch of problems: 1) due to symbol duplication and duplicate static data, a lot of singletons may exist twice 2) all static constructors (logging, crash-handling, etc.) are run a second time, overriding any custom configuration that was applied after config parsing. If you are legitimately building a custom appman binary, a custom launcher or a native app using launcher-lib, you need to flag this via compile-time defines now: Either AM_COMPILING_APPMAN or AM_COMPILING_LAUNCHER AM_COMPILING_LAUNCHER is also used for native apps using launcher-lib. Change-Id: I0c1a3fb7e0c7121f92d44c764c2c1eeb720e7041 Pick-to: 6.4 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'src/window-lib')
-rw-r--r--src/window-lib/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/window-lib/CMakeLists.txt b/src/window-lib/CMakeLists.txt
index 48901d3c..ab60bf26 100644
--- a/src/window-lib/CMakeLists.txt
+++ b/src/window-lib/CMakeLists.txt
@@ -24,6 +24,8 @@ qt_internal_add_module(AppManWindowPrivate
Qt::Network
Qt::Qml
Qt::Quick
+ DEFINES
+ AM_COMPILING_APPMAN
)
if(QT_FEATURE_am_multi_process)