Skip to content

Commit bb83acd

Browse files
committed
Fetch sdbus-c++ in EDM mode
Signed-off-by: Kai-Uwe Hermann <[email protected]>
1 parent 81339bf commit bb83acd

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

.ci/build-kit/docker/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,3 @@ FROM ghcr.io/everest/everest-ci/build-kit-base:${BASE_IMAGE_TAG}
1010
# && cd ${EVEREST_CMAKE_PATH} \
1111
# && git checkout ${EVEREST_CMAKE_VERSION} \
1212
# && rm -r .git
13-
14-
# FIXME(kai): Install sdbus-c++ v2.1.0 from source until CI is updated to debian 13
15-
RUN apt-get update && apt-get -y install libsystemd-dev
16-
RUN git clone https://github.com/Kistler-Group/sdbus-cpp.git -b v2.1.0
17-
RUN cmake -S sdbus-cpp -B sdbus-cpp-build -DCMAKE_BUILD_TYPE=Release
18-
RUN cmake --build sdbus-cpp-build --target install

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ if(NOT DISABLE_EDM)
9797

9898
# FIXME (aw): we need to set this by hand due to edm
9999
set(EVEREST_SCHEMA_DIR ${everest-framework_SOURCE_DIR}/schemas)
100+
101+
if(NOT TARGET SDBusCpp::sdbus-c++)
102+
add_library(SDBusCpp::sdbus-c++ ALIAS sdbus-c++)
103+
endif()
100104
else()
101105
find_package(everest-framework REQUIRED)
102106
find_package(everest-ocpp REQUIRED)
@@ -115,6 +119,8 @@ else()
115119
find_package(nlohmann_json REQUIRED)
116120

117121
find_package(ftxui 5 QUIET) # optional, if not available BringUp module will not be built
122+
123+
find_package(sdbus-c++ REQUIRED)
118124
endif()
119125

120126

dependencies.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ mqttc:
105105
git: https://github.com/LiamBindle/MQTT-C.git
106106
git_tag: v1.1.6
107107
options: ["MQTT_C_EXAMPLES OFF", "CMAKE_POSITION_INDEPENDENT_CODE ON"]
108+
# Linux_Systemd_Rauc module
109+
sdbus-cpp:
110+
git: https://github.com/Kistler-Group/sdbus-cpp.git
111+
git_tag: v2.1.0
112+
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_SDBUS_CPP"
108113
# unit testing
109114
gtest:
110115
# GoogleTest now follows the Abseil Live at Head philosophy. We recommend updating to the latest commit in the main branch as often as possible.

lib/everest/system/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
2-
find_package(sdbus-c++ REQUIRED)
1+
if(NOT DEFINED sdbus-c++_VERSION_MAJOR AND NOT DISABLE_EDM)
2+
string(REPLACE "." ";" SDBUS_CPP_VERSION_SPLIT ${CPM_PACKAGE_sdbus-cpp_VERSION})
3+
list(GET SDBUS_CPP_VERSION_SPLIT 0 sdbus-c++_VERSION_MAJOR)
4+
endif()
35
message("Found sdbus-c++ major version: " ${sdbus-c++_VERSION_MAJOR})
46

57
add_library(everest_system STATIC)

module-dependencies.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ ev_define_dependency(
6262
DEPENDENCY_NAME ftxui
6363
DEPENDENT_MODULES_LIST BUDisplayMessage BUEvseBoardSupport BUIsolationMonitor BUmMWcar BUNfcReader BUOverVoltageMonitor BUPowermeter BUPowerSupplyDC BUSystem)
6464

65+
ev_define_dependency(
66+
DEPENDENCY_NAME sdbus-cpp
67+
OUTPUT_VARIABLE_SUFFIX SDBUS_CPP
68+
DEPENDENT_MODULES_LIST Linux_Systemd_Rauc)
69+
6570
if(NOT everest-gpio IN_LIST EVEREST_EXCLUDE_DEPENDENCIES)
6671
set(EVEREST_DEPENDENCY_ENABLED_EVEREST_GPIO ON)
6772
else()

0 commit comments

Comments
 (0)