vcpkg/ports/parallel-hashmap/portfile.cmake
2024-09-24 10:05:26 -04:00

27 lines
913 B
CMake

#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO greg7mdp/parallel-hashmap
REF "v${VERSION}"
SHA512 76ed02d92ea11248422be6728f10ee6b2dec91856e22e8475f04ec77b43b1885877e1c53ab2732fdf00fe550d1ce70f3daa4a5e7a47b6cf6d110c9b7ed77f7a7
HEAD_REF master
)
# Use greg7mdp/parallel-hashmap's own build process, skipping examples and tests
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPHMAP_BUILD_TESTS=OFF
-DPHMAP_BUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
# Delete redundant directories
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc)
file(COPY ${SOURCE_PATH}/phmap.natvis DESTINATION ${CURRENT_PACKAGES_DIR}/include)
# Put the licence file where vcpkg expects it
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)