2021-03-02 08:07:58 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ithewei/libhv
|
2022-02-19 06:35:12 +08:00
|
|
|
REF v1.2.4
|
|
|
|
SHA512 5732800970180294DCEB329F25D22B1A7178739A2A5A2CE32E030F4FD38055A6298797D26E7FF5525AC662059FF0AAEDB8ABC200E0BA9E4EEBEB5846FB53F4D0
|
2021-03-02 08:07:58 +08:00
|
|
|
HEAD_REF master
|
2022-03-19 05:52:54 +08:00
|
|
|
PATCHES
|
|
|
|
fix-find_package.patch
|
2021-03-02 08:07:58 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
2022-03-19 05:52:54 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
ssl WITH_OPENSSL
|
|
|
|
)
|
|
|
|
|
2021-10-12 11:22:16 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-04-27 01:27:45 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2021-03-02 08:07:58 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_EXAMPLES=OFF
|
|
|
|
-DBUILD_UNITTEST=OFF
|
|
|
|
-DBUILD_STATIC=${BUILD_STATIC}
|
|
|
|
-DBUILD_SHARED=${BUILD_SHARED}
|
2022-03-19 05:52:54 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-03-02 08:07:58 +08:00
|
|
|
)
|
|
|
|
|
2021-10-12 11:22:16 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-03-02 08:07:58 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2021-10-12 11:22:16 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2021-09-14 05:55:05 +08:00
|
|
|
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/hv.dll")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/bin/hv.dll")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/hv.dll")
|
|
|
|
endif()
|