mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 20:32:47 +08:00
[rhash] new port
This commit is contained in:
parent
a3e607c8f1
commit
c4e4ba6418
15
ports/rhash/CMakeLists.txt
Normal file
15
ports/rhash/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(rhash C)
|
||||
|
||||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makefile RHASH_SOURCES REGEX "^SOURCES = .*$")
|
||||
string(REPLACE "SOURCES = " "" RHASH_SOURCES "${RHASH_SOURCES}")
|
||||
string(REPLACE " " ";" RHASH_SOURCES "${RHASH_SOURCES}")
|
||||
|
||||
add_library(rhash ${RHASH_SOURCES})
|
||||
set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS")
|
||||
|
||||
install(TARGETS rhash RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
|
||||
|
||||
if(NOT RHASH_SKIP_HEADERS)
|
||||
install(FILES rhash.h rhash_torrent.h DESTINATION include)
|
||||
endif()
|
3
ports/rhash/CONTROL
Normal file
3
ports/rhash/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: rhash
|
||||
Version: 1.3.5
|
||||
Description: C library for computing a wide variety of hash sums
|
25
ports/rhash/portfile.cmake
Normal file
25
ports/rhash/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "UWP builds not supported")
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rhash/RHash
|
||||
REF v1.3.5
|
||||
SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c
|
||||
HEAD_REF master)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/librhash
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DRHASH_SKIP_HEADERS=ON)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rhash)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/rhash/COPYING ${CURRENT_PACKAGES_DIR}/share/rhash/copyright)
|
Loading…
Reference in New Issue
Block a user