summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/FindWrapDBus1.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/FindWrapDBus1.cmake b/cmake/FindWrapDBus1.cmake
index 55f9757c45..7784c1a027 100644
--- a/cmake/FindWrapDBus1.cmake
+++ b/cmake/FindWrapDBus1.cmake
@@ -2,7 +2,10 @@
# Work around that:-/
# See https://gitlab.freedesktop.org/dbus/dbus/issues/267 for more information
-if(DBus1_FOUND OR WrapDBus1_FOUND)
+# When doing top-level static Qt builds, we need to protect against double creation of the dbus
+# target.
+if(DBus1_FOUND OR WrapDBus1_FOUND OR TARGET dbus-1)
+ set(WrapDBus1_FOUND 1)
return()
endif()