File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ Use -D prefix when configuring the build.
4545 * USE_CCACHE_CACHING = ON | OFF, enable CCache support if available
4646 * USE_SYSTEM_MQTT_LIBS = ON | OFF, prefer system qMQTT libs
4747 * USE_SYSTEM_FLATBUFFERS_LIBS = ON | OFF, prefer system Flatbuffers libs
48+ * USE_SYSTEM_SDBUS_CPP_LIBS = ON | OFF, prefer system sdbus_c++ libs
4849 * USE_STATIC_QT_PLUGINS = ON | OFF, embed static QT-plugins into the application
4950 * USE_STANDARD_INSTALLER_NAME = ON | OFF, use standard Linux package naming
5051
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ SET ( DEFAULT_PROTOBUF ON )
3434SET ( DEFAULT_WS281XPWM OFF )
3535SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS ON )
3636SET ( DEFAULT_USE_SYSTEM_MQTT_LIBS OFF )
37+ SET ( DEFAULT_USE_SYSTEM_SDBUS_CPP_LIBS OFF )
3738SET ( DEFAULT_MF OFF )
3839SET ( DEFAULT_DX OFF )
3940SET ( DEFAULT_AVF OFF )
@@ -513,6 +514,9 @@ colorMe("USE_SYSTEM_MQTT_LIBS = " ${USE_SYSTEM_MQTT_LIBS})
513514option (USE_SYSTEM_FLATBUFFERS_LIBS "Use system flatbuffers libs" ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS} )
514515colorMe("USE_SYSTEM_FLATBUFFERS_LIBS = " ${USE_SYSTEM_FLATBUFFERS_LIBS} )
515516
517+ option (USE_SYSTEM_SDBUS_CPP_LIBS "Use system sdbus-c++ libs" ${DEFAULT_USE_SYSTEM_SDBUS_CPP_LIBS} )
518+ colorMe("USE_SYSTEM_SDBUS_CPP_LIBS = " ${USE_SYSTEM_SDBUS_CPP_LIBS} )
519+
516520option (USE_STATIC_QT_PLUGINS "Enable static QT plugins" ${DEFAULT_STATIC_QT_PLUGINS} )
517521colorMe("USE_STATIC_QT_PLUGINS = " ${USE_STATIC_QT_PLUGINS} )
518522
Original file line number Diff line number Diff line change @@ -262,9 +262,20 @@ ENDIF()
262262#=============================================================================
263263
264264if (UNIX AND NOT APPLE AND (ENABLE_POWER_MANAGEMENT OR ENABLE_PIPEWIRE))
265- set (SDBUSCPP_BUILD_DOCS OFF CACHE BOOL "No doc" )
266- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /sdbus-cpp)
267- set_target_properties (sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ON )
265+ if (USE_SYSTEM_SDBUS_CPP_LIBS)
266+ pkg_check_modules (sdbus-c++ sdbus-c++>=2.0.0)
267+
268+ if (NOT sdbus-c++_FOUND)
269+ message ( WARNING "Could not find: sdbus-c++>=2.0.0. Fallback to sdbus-c++ submodule." )
270+ endif ()
271+ endif ()
272+
273+ if (NOT sdbus-c++_FOUND)
274+ message ( "Using sdbus-c++ submodule." )
275+ set (SDBUSCPP_BUILD_DOCS OFF CACHE BOOL "No doc" )
276+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /sdbus-cpp)
277+ set_target_properties (sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ON )
278+ endif ()
268279endif ()
269280
270281#=============================================================================
You can’t perform that action at this time.
0 commit comments