2021-03-02 08:07:58 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ithewei/libhv
|
2021-09-14 05:55:05 +08:00
|
|
|
REF v1.2.1
|
|
|
|
SHA512 c917b50a2def643b808782631cae33289b62193b9ccb95f4f7736f4d1256de72358931263d5cc06f4581950d91656e700941cb0b929d2f73f650f5297d358b38
|
2021-03-02 08:07:58 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
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}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
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()
|