2021-03-02 08:07:58 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ithewei/libhv
|
2021-10-12 11:22:16 +08:00
|
|
|
REF v1.2.2
|
|
|
|
SHA512 D0CB0BE3901E282E642FE454ADF0CAAF1840DD0CD340B6558E40270CF32608FF0773AAAD0BE1B9EA97BE5BD41B4CEB00FA92CDDA1590B71900A3D8EE4AB2358F
|
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)
|
|
|
|
|
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}
|
|
|
|
)
|
|
|
|
|
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()
|