vcpkg/ports/sdbus-cpp/portfile.cmake

39 lines
1.2 KiB
CMake
Raw Normal View History

2023-10-10 06:29:42 +08:00
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 8f4cb9ae88b1ec0db0bcc27e131fcb9ad8a8bc88e39721b3b73f63e057bae4cd36619894e25114ccddb1a8e6c21db2f80adcabb3263ff5d8b34b72af7563afe2
PATCHES
pic.patch # can be dropped once https://github.com/Kistler-Group/sdbus-cpp/pull/361 is merged+released
)
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(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()