2019-12-21 04:05:10 +08:00
|
|
|
IF (NOT VCPKG_TARGET_IS_LINUX)
|
2019-05-03 04:53:28 +08:00
|
|
|
set(USE_LIBUV ON)
|
|
|
|
EndIF ()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO uNetworking/uSockets
|
2021-01-20 02:55:29 +08:00
|
|
|
REF 7683672d87067cd75b854f4e36b9820f4809a4be # 2021-1-19
|
|
|
|
SHA512 0dbedc5e90af9a92e6597e801116b57fd99dcd5a8488e3b5ddce83bbcd1852d30f2c8954dc1991a807d32f00bdb62e654498687fec344d295f299ccf3920a1ca
|
2019-05-03 04:53:28 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
|
2020-03-05 02:38:47 +08:00
|
|
|
if ("network" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
message(FATAL_ERROR "Feature network only support Windows")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
ssl CMAKE_USE_OPENSSL
|
|
|
|
event CMAKE_USE_EVENT
|
|
|
|
network CMAKE_USE_NETWORK
|
|
|
|
)
|
2019-05-03 04:53:28 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2020-03-05 02:38:47 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2019-05-03 04:53:28 +08:00
|
|
|
-DLIBUS_USE_LIBUV=${USE_LIBUV}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DINSTALL_HEADERS=OFF
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-12-21 04:05:10 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2019-05-03 04:53:28 +08:00
|
|
|
|
2021-01-20 02:55:29 +08:00
|
|
|
vcpkg_copy_pdbs()
|