logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

0002-CMake-Add-option-to-disable-DBus-support.patch (2218B)


  1. From 76db7740c646dfcc5738696c974ae385fd2ed773 Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Wed, 21 Sep 2022 08:59:30 +0200
  4. Subject: [PATCH 2/2] CMake: Add option to disable DBus support
  5. ---
  6. CMakeLists.txt | 13 ++++++++++---
  7. qt5/CMakeLists.txt | 10 +++++++---
  8. 2 files changed, 17 insertions(+), 6 deletions(-)
  9. diff --git a/CMakeLists.txt b/CMakeLists.txt
  10. index 144884d..f0830ba 100644
  11. --- a/CMakeLists.txt
  12. +++ b/CMakeLists.txt
  13. @@ -10,6 +10,7 @@ find_package(ECM 1.4.0 REQUIRED)
  14. set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  15. +option(ENABLE_DBUS "Enable DBus" On)
  16. option(ENABLE_QT4 "Enable Qt 4" On)
  17. option(ENABLE_QT5 "Enable Qt 5" On)
  18. option(ENABLE_QT6 "Enable Qt 6" Off)
  19. @@ -75,19 +76,25 @@ if(ENABLE_QT4)
  20. endif()
  21. if(ENABLE_QT5)
  22. - find_package(Qt5 ${REQUIRED_QT5_VERSION} CONFIG REQUIRED Core DBus Widgets)
  23. + find_package(Qt5 ${REQUIRED_QT5_VERSION} CONFIG REQUIRED Core Widgets)
  24. find_package(Qt5Gui ${REQUIRED_QT5_VERSION} REQUIRED Private)
  25. + if(ENABLE_DBUS)
  26. + find_package(Qt5 ${REQUIRED_QT5_VERSION} CONFIG REQUIRED DBus)
  27. + endif()
  28. add_subdirectory(qt5)
  29. endif()
  30. if(ENABLE_QT6)
  31. - find_package(Qt6 ${REQUIRED_QT6_VERSION} CONFIG REQUIRED Core DBus Widgets)
  32. + find_package(Qt6 ${REQUIRED_QT6_VERSION} CONFIG REQUIRED Core Widgets)
  33. find_package(Qt6Gui ${REQUIRED_QT6_VERSION} REQUIRED Private)
  34. + if (ENABLE_DBUS)
  35. + find_package(Qt6 ${REQUIRED_QT6_VERSION} CONFIG REQUIRED DBus)
  36. + endif()
  37. add_subdirectory(qt6)
  38. endif()
  39. if(NOT BUILD_ONLY_PLUGIN)
  40. -add_subdirectory(po)
  41. + add_subdirectory(po)
  42. endif()
  43. enable_testing()
  44. diff --git a/qt5/CMakeLists.txt b/qt5/CMakeLists.txt
  45. index 9defa3d..f2c207b 100644
  46. --- a/qt5/CMakeLists.txt
  47. +++ b/qt5/CMakeLists.txt
  48. @@ -1,8 +1,12 @@
  49. -add_subdirectory(dbusaddons)
  50. -add_subdirectory(platforminputcontext)
  51. +if (ENABLE_DBUS)
  52. + add_subdirectory(dbusaddons)
  53. + add_subdirectory(platforminputcontext)
  54. +endif()
  55. if(NOT BUILD_ONLY_PLUGIN)
  56. - add_subdirectory(guiwrapper)
  57. + if (ENABLE_DBUS)
  58. + add_subdirectory(guiwrapper)
  59. + endif()
  60. add_subdirectory(widgetsaddons)
  61. add_subdirectory(quickphrase-editor)
  62. add_subdirectory(immodule-probing)
  63. --
  64. 2.41.0