aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/promise-cpp
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/promise-cpp
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/promise-cpp')
-rw-r--r--vcpkg/ports/promise-cpp/portfile.cmake14
-rw-r--r--vcpkg/ports/promise-cpp/usage9
-rw-r--r--vcpkg/ports/promise-cpp/vcpkg.json12
3 files changed, 35 insertions, 0 deletions
diff --git a/vcpkg/ports/promise-cpp/portfile.cmake b/vcpkg/ports/promise-cpp/portfile.cmake
new file mode 100644
index 0000000..69789ac
--- /dev/null
+++ b/vcpkg/ports/promise-cpp/portfile.cmake
@@ -0,0 +1,14 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xhawk18/promise-cpp
+ REF ${VERSION}
+ SHA512 18e09cf4caffee2864b45e46b4385daf960aa5ec340e680e4d0303803360c910a8618b9e1365a18693f1d89ba50b42ad7f2e2b5f8b26d3883b48f8c1337efbe5
+ HEAD_REF master
+)
+
+file(GLOB PROMISE_HEADERS "${SOURCE_PATH}/include/*.hpp")
+file(INSTALL "${SOURCE_PATH}/include/promise-cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/promise-cpp/usage b/vcpkg/ports/promise-cpp/usage
new file mode 100644
index 0000000..0e9d486
--- /dev/null
+++ b/vcpkg/ports/promise-cpp/usage
@@ -0,0 +1,9 @@
+The package promise-cpp is header only and can be used from CMake via:
+
+ find_path(PROMISE_CPP_INCLUDE_DIRS "promise-cpp/promise.hpp")
+ target_include_directories(main PRIVATE ${PROMISE_CPP_INCLUDE_DIRS})
+
+Make sure to define the pre-processor macro PROMISE_HEADONLY before including "promise-cpp/promise.hpp":
+
+ #define PROMISE_HEADONLY
+ #include "promise-cpp/promise.hpp" \ No newline at end of file
diff --git a/vcpkg/ports/promise-cpp/vcpkg.json b/vcpkg/ports/promise-cpp/vcpkg.json
new file mode 100644
index 0000000..55a07fd
--- /dev/null
+++ b/vcpkg/ports/promise-cpp/vcpkg.json
@@ -0,0 +1,12 @@
+{
+ "name": "promise-cpp",
+ "version": "2.1.5",
+ "description": "C++ promise/A+ library in Javascript style.",
+ "homepage": "https://github.com/xhawk18/promise-cpp",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}