early-access version 2853
This commit is contained in:
12
externals/vcpkg/ports/cpp-redis/fix-sleep_for.patch
vendored
Executable file
12
externals/vcpkg/ports/cpp-redis/fix-sleep_for.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/sources/core/client.cpp b/sources/core/client.cpp
|
||||
index 7ea20e2..c5d2c40 100644
|
||||
--- a/sources/core/client.cpp
|
||||
+++ b/sources/core/client.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <cpp_redis/core/client.hpp>
|
||||
#include <cpp_redis/misc/error.hpp>
|
||||
#include <cpp_redis/misc/macro.hpp>
|
||||
+#include <thread>
|
||||
|
||||
namespace cpp_redis {
|
||||
|
62
externals/vcpkg/ports/cpp-redis/portfile.cmake
vendored
Executable file
62
externals/vcpkg/ports/cpp-redis/portfile.cmake
vendored
Executable file
@@ -0,0 +1,62 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cpp-redis/cpp_redis
|
||||
REF 4.3.1
|
||||
SHA512 abf372542c53f37f504b3211b840b100d07a8f4b2e7f5584cc7550ab16ed617838e2df79064374c7a409458d8567f4834686318ea3a40249c767e36c744c7a47
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"fix-sleep_for.patch"
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
||||
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD")
|
||||
else()
|
||||
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
# cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected.
|
||||
set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1")
|
||||
set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*")
|
||||
foreach(file ${FILES})
|
||||
file(READ ${file} _contents)
|
||||
string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 1" _contents "${_contents}")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
string(REPLACE
|
||||
"extern std::unique_ptr<logger_iface> active_logger;"
|
||||
"extern __declspec(dllimport) std::unique_ptr<logger_iface> active_logger;"
|
||||
_contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE ${file} "${_contents}")
|
||||
endforeach()
|
||||
|
||||
file(GLOB FILES_TO_REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/cpp_redis.ilk" "${CURRENT_PACKAGES_DIR}/bin/cpp_redis.dll.manifest")
|
||||
if(FILES_TO_REMOVE)
|
||||
file(REMOVE_RECURSE ${FILES_TO_REMOVE})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
vcpkg_fixup_pkgconfig()
|
8
externals/vcpkg/ports/cpp-redis/tacopie/CMakeLists.txt
vendored
Executable file
8
externals/vcpkg/ports/cpp-redis/tacopie/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
find_library(TACOPIE tacopie)
|
||||
find_path(TACOPIE_H tacopie/tacopie)
|
||||
|
||||
message(STATUS "TACOPIE_H: ${TACOPIE_H}")
|
||||
|
||||
add_library(tacopie INTERFACE)
|
||||
target_link_libraries(tacopie INTERFACE "${TACOPIE}")
|
||||
target_include_directories(tacopie INTERFACE "${TACOPIE_H}")
|
19
externals/vcpkg/ports/cpp-redis/vcpkg.json
vendored
Executable file
19
externals/vcpkg/ports/cpp-redis/vcpkg.json
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "cpp-redis",
|
||||
"version": "4.3.1",
|
||||
"port-version": 5,
|
||||
"description": "cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining.",
|
||||
"homepage": "https://github.com/cpp-redis/cpp_redis",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"tacopie",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user