aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tiny-aes-c
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/tiny-aes-c')
-rw-r--r--vcpkg/ports/tiny-aes-c/CMakeLists.txt24
-rw-r--r--vcpkg/ports/tiny-aes-c/portfile.cmake24
-rw-r--r--vcpkg/ports/tiny-aes-c/vcpkg.json17
3 files changed, 65 insertions, 0 deletions
diff --git a/vcpkg/ports/tiny-aes-c/CMakeLists.txt b/vcpkg/ports/tiny-aes-c/CMakeLists.txt
new file mode 100644
index 0000000..6e32225
--- /dev/null
+++ b/vcpkg/ports/tiny-aes-c/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.14)
+
+project(tiny-aes-c LANGUAGES C ASM)
+
+include(GNUInstallDirs)
+
+add_library(tiny-aes-c aes.c)
+
+target_include_directories(
+ tiny-aes-c
+ PUBLIC
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+install(FILES aes.h aes.hpp DESTINATION include)
+
+install(TARGETS tiny-aes-c EXPORT unofficial-tiny-aes-c-config)
+
+install(
+ EXPORT unofficial-tiny-aes-c-config
+ NAMESPACE unofficial::tiny-aes-c::
+ DESTINATION share/unofficial-tiny-aes-c
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+)
diff --git a/vcpkg/ports/tiny-aes-c/portfile.cmake b/vcpkg/ports/tiny-aes-c/portfile.cmake
new file mode 100644
index 0000000..6883ba8
--- /dev/null
+++ b/vcpkg/ports/tiny-aes-c/portfile.cmake
@@ -0,0 +1,24 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO kokke/tiny-AES-c
+ REF ca85e00de963102d3999ea5fa865c0deff6370d3
+ SHA512 538d5d9cee8cecbf801d3553f2425f8a1331b59c652c11ee56c6e46a23450c1e9a59e3e1833f4384b7a4d992a93f30635855a47e2414b9293e0d27c426b6a4f3
+ 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}/unlicense.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/vcpkg/ports/tiny-aes-c/vcpkg.json b/vcpkg/ports/tiny-aes-c/vcpkg.json
new file mode 100644
index 0000000..5e91549
--- /dev/null
+++ b/vcpkg/ports/tiny-aes-c/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "tiny-aes-c",
+ "version-date": "2019-07-31",
+ "port-version": 3,
+ "description": "Small portable AES128/192/256 in C",
+ "homepage": "https://github.com/kokke/tiny-AES-c",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}