vcpkg/ports/etcd-cpp-apiv3/portfile.cmake
2023-03-27 11:45:52 -07:00

30 lines
949 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO etcd-cpp-apiv3/etcd-cpp-apiv3
REF "v${VERSION}"
SHA512 3bf1e0b178ddc77c8c0818f049cc83ac08d44ca767835eac9514d7af3c7cf583d1d3bf25c2d8cb02afd60a73fb493cb0956d3154baaa6203f5db0e79c0163f57
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_ETCD_TESTS=OFF
)
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
set(VCPKG_POLICY_DLLS_WITHOUT_EXPORTS enabled)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/etcd-cpp-api)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/etcd-cpp-apiv3" RENAME copyright)
# Adding usage text
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")