diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/sdbus-cpp | |
Diffstat (limited to 'vcpkg/ports/sdbus-cpp')
| -rw-r--r-- | vcpkg/ports/sdbus-cpp/portfile.cmake | 36 | ||||
| -rw-r--r-- | vcpkg/ports/sdbus-cpp/usage | 3 | ||||
| -rw-r--r-- | vcpkg/ports/sdbus-cpp/vcpkg.json | 28 |
3 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/sdbus-cpp/portfile.cmake b/vcpkg/ports/sdbus-cpp/portfile.cmake new file mode 100644 index 0000000..18da4c8 --- /dev/null +++ b/vcpkg/ports/sdbus-cpp/portfile.cmake @@ -0,0 +1,36 @@ +message(WARNING "You will need to install sytemd dependencies to build sdbus-cpp:\nsudo apt install libsystemd-dev\n") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kistler-Group/sdbus-cpp + REF "v${VERSION}" + SHA512 4247d49f0d5231e2768c0c96fa9c266bbcc340292c9c3d748f9c37ff992b82301faea798300f916e9a5c992d77adfe56186866c91a4c7d4157750ff09ba5a047 +) + + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tool SDBUSCPP_BUILD_CODEGEN +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DSDBUSCPP_BUILD_LIBSYSTEMD=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME sdbus-c++ CONFIG_PATH lib/cmake/sdbus-c++) +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/bin" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/COPYING-LGPL-Exception") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +if ("tool" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES sdbus-c++-xml2cpp AUTO_CLEAN) +endif() diff --git a/vcpkg/ports/sdbus-cpp/usage b/vcpkg/ports/sdbus-cpp/usage new file mode 100644 index 0000000..bea252a --- /dev/null +++ b/vcpkg/ports/sdbus-cpp/usage @@ -0,0 +1,3 @@ +sdbus-cpp provides CMake targets: + find_package(sdbus-c++ REQUIRED) + target_link_libraries(main PRIVATE SDBusCpp::sdbus-c++) diff --git a/vcpkg/ports/sdbus-cpp/vcpkg.json b/vcpkg/ports/sdbus-cpp/vcpkg.json new file mode 100644 index 0000000..75c6441 --- /dev/null +++ b/vcpkg/ports/sdbus-cpp/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "sdbus-cpp", + "version": "2.1.0", + "description": "High-level C++ D-Bus library for Linux designed to provide easy-to-use yet powerful API in modern C++", + "homepage": "https://github.com/Kistler-Group/sdbus-cpp", + "license": "LGPL-2.1-only", + "supports": "linux", + "dependencies": [ + "dbus", + "libsystemd", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tool": { + "description": "build C++ codegen tool", + "dependencies": [ + "expat" + ] + } + } +} |