2019-12-24 04:18:50 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2019-11-02 08:10:50 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO redis/hiredis
|
2020-12-01 02:17:12 +08:00
|
|
|
REF v1.0.0
|
|
|
|
SHA512 eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69
|
2019-11-02 08:10:50 +08:00
|
|
|
HEAD_REF master
|
2019-12-24 04:18:50 +08:00
|
|
|
PATCHES
|
|
|
|
fix-feature-example.patch
|
|
|
|
support-static-in-win.patch
|
2020-03-11 07:57:03 +08:00
|
|
|
fix-timeval.patch
|
2021-03-11 04:01:27 +08:00
|
|
|
fix-include-path.patch
|
2019-11-02 08:10:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-12-01 02:17:12 +08:00
|
|
|
ssl ENABLE_SSL
|
2019-11-02 08:10:50 +08:00
|
|
|
example ENABLE_EXAMPLES
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-11-03 05:04:34 +08:00
|
|
|
PREFER_NINJA
|
2019-11-02 08:10:50 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2020-12-01 02:17:12 +08:00
|
|
|
vcpkg_fixup_cmake_targets()
|
|
|
|
if("ssl" IN_LIST FEATURES)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/hiredis_ssl TARGET_PATH share/hiredis_ssl)
|
|
|
|
endif()
|
2019-11-02 08:10:50 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2020-07-16 06:55:31 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|