2017-05-16 23:16:43 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libuv/libuv
|
2023-06-28 08:07:58 +08:00
|
|
|
REF "v${VERSION}"
|
2024-10-22 02:44:11 +08:00
|
|
|
SHA512 e90680128bfaac215e5eebd9c8e5ce08e5fe68a7258f65bfcf56377756e9dbf527a232dfaf9d217c7374e713660ec99eeaae05d6fee2b8c5c9b71ad1b0b4dd72
|
2018-05-18 17:03:26 +08:00
|
|
|
HEAD_REF v1.x
|
2024-09-04 04:14:30 +08:00
|
|
|
PATCHES
|
|
|
|
fix-build-type.patch
|
|
|
|
ssize_t.patch
|
2018-05-18 17:03:26 +08:00
|
|
|
)
|
2017-05-16 23:16:43 +08:00
|
|
|
|
2023-06-28 08:07:58 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBUV_BUILD_SHARED)
|
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-07-09 04:02:45 +08:00
|
|
|
OPTIONS
|
|
|
|
-DLIBUV_BUILD_TESTS=OFF
|
2023-06-28 08:07:58 +08:00
|
|
|
-DLIBUV_BUILD_BENCH=OFF
|
|
|
|
-DLIBUV_BUILD_SHARED=${LIBUV_BUILD_SHARED}
|
2022-07-09 04:02:45 +08:00
|
|
|
-DQEMU=OFF
|
|
|
|
-DASAN=OFF
|
|
|
|
-DTSAN=OFF
|
2018-05-18 17:03:26 +08:00
|
|
|
)
|
2017-05-16 23:16:43 +08:00
|
|
|
|
2021-09-08 12:40:10 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-05-16 23:16:43 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libuv)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-12-18 08:25:55 +08:00
|
|
|
|
2017-05-16 23:16:43 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2022-07-09 04:02:45 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/uv.h" "defined(USING_UV_SHARED)" "1")
|
2016-11-20 08:16:28 +08:00
|
|
|
else()
|
2022-07-09 04:02:45 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/uv.h" "defined(USING_UV_SHARED)" "0")
|
2016-11-20 08:16:28 +08:00
|
|
|
endif()
|
|
|
|
|
2022-07-09 04:02:45 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2021-09-08 12:40:10 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-04-18 05:13:24 +08:00
|
|
|
|