mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 01:19:00 +08:00
[tiny-bignum-c] Add new port (#7531)
* [tiny-bignum-c] Add new port * [tiny-bignum-c] Fix UWP build
This commit is contained in:
parent
4fb51523e9
commit
25e948e2ba
28
ports/tiny-bignum-c/CMakeLists.txt
Normal file
28
ports/tiny-bignum-c/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(tiny-bignum-c LANGUAGES C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
add_library(tiny-bignum-c bn.c)
|
||||
|
||||
target_include_directories(
|
||||
tiny-bignum-c
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
target_compile_definitions(
|
||||
tiny-bignum-c
|
||||
PRIVATE
|
||||
$<$<C_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
|
||||
)
|
||||
set_target_properties(tiny-bignum-c PROPERTIES PUBLIC_HEADER bn.h)
|
||||
|
||||
install(TARGETS tiny-bignum-c EXPORT unofficial-tiny-bignum-c-config)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-tiny-bignum-c-config
|
||||
NAMESPACE unofficial::tiny-bignum-c::
|
||||
DESTINATION share/unofficial-tiny-bignum-c
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
)
|
4
ports/tiny-bignum-c/CONTROL
Normal file
4
ports/tiny-bignum-c/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: tiny-bignum-c
|
||||
Version: 2019-07-31
|
||||
Description: Small portable multiple-precision unsigned integer arithmetic in C
|
||||
Homepage: https://github.com/kokke/tiny-bignum-c
|
30
ports/tiny-bignum-c/portfile.cmake
Normal file
30
ports/tiny-bignum-c/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO kokke/tiny-bignum-c
|
||||
REF e814d2b6b522ecaa67701453c492811a8adbc555
|
||||
SHA512 2cea21588d018bd74fb9a128576764feecd87364d157acee21bd37cd8890c0776b228e25580de88a0c6d723a7b8e88cb8120c8c66b3999661c707b04dffc3f5b
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
|
||||
# CMake integration test
|
||||
vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})
|
Loading…
Reference in New Issue
Block a user