vcpkg/ports/sdbus-cpp/portfile.cmake
2024-03-28 12:41:45 -07:00

37 lines
1.1 KiB
CMake

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 08dd88f59049c1d0760677561c1a441698e8a154143197e78721ac3ba144ae58f0ad856ca3a718e37d91cd8c83bfdd3bef90d83436adc529c68441283a2a7fbd
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tool BUILD_CODE_GEN
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
-DBUILD_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()