early-access version 2853
This commit is contained in:
12
externals/vcpkg/ports/promise-cpp/fix-ifdef.patch
vendored
Executable file
12
externals/vcpkg/ports/promise-cpp/fix-ifdef.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/include/promise-cpp/promise.hpp b/include/promise-cpp/promise.hpp
|
||||
--- a/include/promise-cpp/promise.hpp
|
||||
+++ b/include/promise-cpp/promise.hpp
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef INC_PROMISE_HPP_
|
||||
#define INC_PROMISE_HPP_
|
||||
|
||||
-#ifdef PROMISE_HEADER_ONLY
|
||||
+#ifdef PROMISE_HEADONLY
|
||||
#define PROMISE_API inline
|
||||
#elif defined PROMISE_BUILD_SHARED
|
||||
|
15
externals/vcpkg/ports/promise-cpp/portfile.cmake
vendored
Executable file
15
externals/vcpkg/ports/promise-cpp/portfile.cmake
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xhawk18/promise-cpp
|
||||
REF 2.1.2
|
||||
SHA512 490571e6d6742e05ae6a2549af4e242a1d7084edc583fbbb183798bdddb25d08a7f68becfa94f55b877cba7e2e8e8515964f892881591b5bb394b4b33e6593f7
|
||||
HEAD_REF master
|
||||
PATCHES fix-ifdef.patch
|
||||
)
|
||||
|
||||
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}")
|
9
externals/vcpkg/ports/promise-cpp/usage
vendored
Executable file
9
externals/vcpkg/ports/promise-cpp/usage
vendored
Executable file
@@ -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"
|
12
externals/vcpkg/ports/promise-cpp/vcpkg.json
vendored
Executable file
12
externals/vcpkg/ports/promise-cpp/vcpkg.json
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "promise-cpp",
|
||||
"version": "2.1.2",
|
||||
"description": "C++ promise/A+ library in Javascript style.",
|
||||
"homepage": "https://github.com/xhawk18/promise-cpp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user