aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tiny-bignum-c
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/tiny-bignum-c')
-rw-r--r--vcpkg/ports/tiny-bignum-c/CMakeLists.txt28
-rw-r--r--vcpkg/ports/tiny-bignum-c/portfile.cmake24
-rw-r--r--vcpkg/ports/tiny-bignum-c/vcpkg.json17
3 files changed, 69 insertions, 0 deletions
diff --git a/vcpkg/ports/tiny-bignum-c/CMakeLists.txt b/vcpkg/ports/tiny-bignum-c/CMakeLists.txt
new file mode 100644
index 0000000..8891356
--- /dev/null
+++ b/vcpkg/ports/tiny-bignum-c/CMakeLists.txt
@@ -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
+)
diff --git a/vcpkg/ports/tiny-bignum-c/portfile.cmake b/vcpkg/ports/tiny-bignum-c/portfile.cmake
new file mode 100644
index 0000000..ea7b41a
--- /dev/null
+++ b/vcpkg/ports/tiny-bignum-c/portfile.cmake
@@ -0,0 +1,24 @@
+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_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Handle copyright
+configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/vcpkg/ports/tiny-bignum-c/vcpkg.json b/vcpkg/ports/tiny-bignum-c/vcpkg.json
new file mode 100644
index 0000000..049e407
--- /dev/null
+++ b/vcpkg/ports/tiny-bignum-c/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "tiny-bignum-c",
+ "version-date": "2019-07-31",
+ "port-version": 3,
+ "description": "Small portable multiple-precision unsigned integer arithmetic in C",
+ "homepage": "https://github.com/kokke/tiny-bignum-c",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}