vcpkg/ports/redis-plus-plus/portfile.cmake
autoantwort e7e328cf9d
[many ports] call vcpkg_fixup_pkgconfig() (#20953)
* [many ports] call vcpkg_fixup_pkgconfig()

The ports generate pc files, but don't call vcpkg_fixup_pkgconfig() so that there are absolute paths in the pc files

* Update port-version for armadillo and polyclipping.

* Update version database.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-10-27 15:19:28 -07:00

42 lines
1.3 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sewenew/redis-plus-plus
REF cff6ab8d8557a113ad97dfb779eb46647f7c92c7 # 1.3.1
SHA512 2bd179f47b13d05d58358ddf1aeef93fbc9e748a12f07fa5bd59fd75adcf7f3261d5f871d8fd33628d2d9df04e341ed24314fc2e817887ba0079e2711b5da317
HEAD_REF master
PATCHES
fix-ws2-linking-windows.patch
fix-conversion.patch
)
if("cxx17" IN_LIST FEATURES)
set(REDIS_PLUS_PLUS_CXX_STANDARD 17)
else()
set(REDIS_PLUS_PLUS_CXX_STANDARD 11)
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}
)
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()