2019-11-22 09:16:30 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO sewenew/redis-plus-plus
|
2023-06-08 00:40:40 +08:00
|
|
|
REF 4368319fb668204f345da05b9dd79762506c67b6 # 1.3.8
|
|
|
|
SHA512 37774078fb98992c4b4be276c91a2b6a8b8810d62a5087184d1fa2c05db77de15058d5139747578f7a2f9219351c05de32740b63c153ea902493d4b5d05c2d68
|
2019-11-22 09:16:30 +08:00
|
|
|
HEAD_REF master
|
2020-10-27 15:53:49 +08:00
|
|
|
PATCHES
|
|
|
|
fix-conversion.patch
|
2022-06-18 03:47:31 +08:00
|
|
|
fix-dependency-libuv.patch
|
2023-06-08 00:40:40 +08:00
|
|
|
fix-absolute-path.patch
|
2019-11-22 09:16:30 +08:00
|
|
|
)
|
|
|
|
|
2020-12-02 06:16:00 +08:00
|
|
|
if("cxx17" IN_LIST FEATURES)
|
|
|
|
set(REDIS_PLUS_PLUS_CXX_STANDARD 17)
|
|
|
|
else()
|
|
|
|
set(REDIS_PLUS_PLUS_CXX_STANDARD 11)
|
|
|
|
endif()
|
|
|
|
|
2022-06-18 03:47:31 +08:00
|
|
|
set(EXTRA_OPT "")
|
|
|
|
if ("async" IN_LIST FEATURES)
|
|
|
|
list(APPEND EXTRA_OPT -DREDIS_PLUS_PLUS_BUILD_ASYNC="libuv")
|
|
|
|
endif()
|
|
|
|
if ("async-std" IN_LIST FEATURES)
|
|
|
|
list(APPEND EXTRA_OPT -DREDIS_PLUS_PLUS_ASYNC_FUTURE="std")
|
|
|
|
endif()
|
|
|
|
|
2021-09-28 12:11:34 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" REDIS_PLUS_PLUS_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" REDIS_PLUS_PLUS_BUILD_SHARED)
|
2020-10-27 15:53:49 +08:00
|
|
|
|
2021-09-28 12:11:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-06-09 02:17:29 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2020-08-20 10:45:55 +08:00
|
|
|
OPTIONS
|
2020-10-27 15:53:49 +08:00
|
|
|
-DREDIS_PLUS_PLUS_USE_TLS=OFF
|
|
|
|
-DREDIS_PLUS_PLUS_BUILD_STATIC=${REDIS_PLUS_PLUS_BUILD_STATIC}
|
|
|
|
-DREDIS_PLUS_PLUS_BUILD_SHARED=${REDIS_PLUS_PLUS_BUILD_SHARED}
|
2020-08-20 10:45:55 +08:00
|
|
|
-DREDIS_PLUS_PLUS_BUILD_TEST=OFF
|
2020-12-02 06:16:00 +08:00
|
|
|
-DREDIS_PLUS_PLUS_CXX_STANDARD=${REDIS_PLUS_PLUS_CXX_STANDARD}
|
2022-06-18 03:47:31 +08:00
|
|
|
${EXTRA_OPT}
|
2019-11-22 09:16:30 +08:00
|
|
|
)
|
|
|
|
|
2021-09-28 12:11:34 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-11-22 09:16:30 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-09-28 12:11:34 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-06-12 00:52:35 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-11-22 09:16:30 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2020-12-02 06:16:00 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|