aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/half
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/half')
-rw-r--r--vcpkg/ports/half/portfile.cmake14
-rw-r--r--vcpkg/ports/half/usage4
-rw-r--r--vcpkg/ports/half/vcpkg.json7
3 files changed, 25 insertions, 0 deletions
diff --git a/vcpkg/ports/half/portfile.cmake b/vcpkg/ports/half/portfile.cmake
new file mode 100644
index 0000000..1182426
--- /dev/null
+++ b/vcpkg/ports/half/portfile.cmake
@@ -0,0 +1,14 @@
+vcpkg_from_sourceforge(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO half/half
+ REF ${VERSION}
+ FILENAME "half-${VERSION}.zip"
+ NO_REMOVE_ONE_LEVEL
+ SHA512 946b1663a736eb486f670ba9dfcc56b43b9e7fb195988174b7dd004bdd2e23aba7a395b8867b4f58c97e73a50edf845b703b8cfc35708a562e6a9d7e1b4f4204
+)
+
+file(GLOB HEADER_FILES "${SOURCE_PATH}/include/*.hpp")
+file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/half/usage b/vcpkg/ports/half/usage
new file mode 100644
index 0000000..803c4c1
--- /dev/null
+++ b/vcpkg/ports/half/usage
@@ -0,0 +1,4 @@
+half is header-only and can be used from CMake via:
+
+ find_path(HALF_INCLUDE_DIRS "half.hpp")
+ target_include_directories(main PRIVATE ${HALF_INCLUDE_DIRS})
diff --git a/vcpkg/ports/half/vcpkg.json b/vcpkg/ports/half/vcpkg.json
new file mode 100644
index 0000000..bf8e133
--- /dev/null
+++ b/vcpkg/ports/half/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "half",
+ "version": "2.2.1",
+ "description": "C++ library for half precision floating point arithmetics.",
+ "homepage": "https://sourceforge.net/projects/half/",
+ "license": "MIT"
+}