Skip to content

Commit

Permalink
Merge pull request #259 from microsoft/fixsdbusdep
Browse files Browse the repository at this point in the history
Add workaround for broken d-bus dependency resolution of libsystemd
  • Loading branch information
abeltrano authored May 8, 2024
2 parents a2cce40 + 62da0c6 commit 1437d77
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

find_package(sdbus-c++ CONFIG REQUIRED)
find_package(sdbus-c++ REQUIRED)

# The d-bus vcpkg port fails to export the libsystemd dependency properly via an imported target which causes the build
# to fail. This is a workaround to fix that by finding the libsystemd dependency via pkg-config and defining a global
# imported target.
include(FindPkgConfig)
pkg_check_modules(Systemd REQUIRED IMPORTED_TARGET GLOBAL libsystemd)

add_subdirectory(external)
add_subdirectory(libnl-helpers)
Expand Down
1 change: 1 addition & 0 deletions src/linux/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target_link_libraries(${PROJECT_NAME}-server-linux
logging-utils
notstd
plog::plog
SDBusCpp::sdbus-c++
wifi-apmanager-linux
wifi-core-linux
)
Expand Down
4 changes: 4 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"name": "sdbus-cpp",
"platform": "linux"
},
{
"name": "libsystemd",
"platform": "linux"
},
"grpc",
"cli11",
"protobuf",
Expand Down

0 comments on commit 1437d77

Please sign in to comment.