vcpkg/ports/rhash/portfile.cmake

29 lines
958 B
CMake
Raw Normal View History

2017-08-24 23:27:32 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rhash/RHash
2023-10-03 08:27:03 +08:00
REF "v${VERSION}"
2024-10-19 06:03:31 +08:00
SHA512 49bd6aa2497efc4871ae31eaca51d2dc78ceb7126311557d5280b14fafe9355eaecad37f0f78f865e4e1dd1aeb506d3301989cd2f9fff7b0091c81978e8c2f2e
HEAD_REF master
)
2017-08-24 23:27:32 +08:00
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/librhash")
2017-08-24 23:27:32 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/librhash"
OPTIONS
-DRHASH_VERSION=${VERSION}
2017-08-24 23:27:32 +08:00
OPTIONS_DEBUG
-DRHASH_SKIP_HEADERS=ON
)
2017-08-24 23:27:32 +08:00
vcpkg_cmake_install()
2017-08-24 23:27:32 +08:00
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-rhash)
vcpkg_fixup_pkgconfig()
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/rhash.h" "# define RHASH_API" "# define RHASH_API __declspec(dllimport)")
endif()
2017-08-24 23:27:32 +08:00
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)