mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 05:19:02 +08:00
945e171c8c
* [redis-plus-plus] Add feature async-std and fix dependency libuv * Re-generate patch * version * Add license * version * Apply suggestion * version
52 lines
1.6 KiB
CMake
52 lines
1.6 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO sewenew/redis-plus-plus
|
|
REF e29c63db54653a660d7a0f556f670b7a6fce0a78 # 1.3.2
|
|
SHA512 47b18f41cfaf5e11d6eba1201a3da3a1ed355583cde0772de68e5f0f25953e1467c83249848b25b16c9db9e3f6c5df5e1dd832f4b3dd41289c69111867e48d8c
|
|
HEAD_REF master
|
|
PATCHES
|
|
fix-ws2-linking-windows.patch
|
|
fix-conversion.patch
|
|
fix-dependency-libuv.patch
|
|
)
|
|
|
|
if("cxx17" IN_LIST FEATURES)
|
|
set(REDIS_PLUS_PLUS_CXX_STANDARD 17)
|
|
else()
|
|
set(REDIS_PLUS_PLUS_CXX_STANDARD 11)
|
|
endif()
|
|
|
|
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()
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" REDIS_PLUS_PLUS_BUILD_STATIC)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" REDIS_PLUS_PLUS_BUILD_SHARED)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-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}
|
|
-DREDIS_PLUS_PLUS_BUILD_TEST=OFF
|
|
-DREDIS_PLUS_PLUS_CXX_STANDARD=${REDIS_PLUS_PLUS_CXX_STANDARD}
|
|
${EXTRA_OPT}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
# Handle copyright
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright )
|
|
|
|
vcpkg_fixup_pkgconfig()
|