2020-12-31 12:13:41 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2019-06-25 06:38:04 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO machinezone/IXWebSocket
|
2023-06-17 11:50:42 +08:00
|
|
|
REF "v${VERSION}"
|
2024-03-23 08:05:19 +08:00
|
|
|
SHA512 9a3b118ecec2ca39094ccbd7ec0610bbc59271a14c9e7ee0ac5d5e01a86111f33b722460ee5a32da60bfa31944acaf9a442d1655233ef252f35fd168d50ab471
|
2019-06-25 06:38:04 +08:00
|
|
|
)
|
|
|
|
|
2020-05-20 05:36:36 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2021-05-21 15:39:28 +08:00
|
|
|
openssl USE_OPEN_SSL
|
|
|
|
mbedtls USE_MBED_TLS
|
|
|
|
sectransp USE_SECURE_TRANSPORT
|
2020-05-20 05:36:36 +08:00
|
|
|
)
|
|
|
|
|
2023-08-26 03:28:55 +08:00
|
|
|
string(COMPARE NOTEQUAL "${FEATURES}" "core" USE_TLS)
|
|
|
|
|
|
|
|
list(REMOVE_ITEM FEATURES "ssl")
|
|
|
|
list(LENGTH FEATURES num_features)
|
|
|
|
if(num_features GREATER "2")
|
|
|
|
message(FATAL_ERROR "Can not select multiple ssl backends at the same time. Disable default features to disable the default ssl backend.")
|
2020-05-20 05:36:36 +08:00
|
|
|
endif()
|
|
|
|
|
2022-03-16 02:17:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-05-07 07:29:05 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-05-20 05:36:36 +08:00
|
|
|
OPTIONS
|
2022-08-02 00:47:25 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2023-08-26 03:28:55 +08:00
|
|
|
-DUSE_TLS=${USE_TLS}
|
2022-05-07 07:29:05 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2022-08-02 00:47:25 +08:00
|
|
|
USE_SECURE_TRANSPORT
|
2023-08-26 03:28:55 +08:00
|
|
|
USE_MBED_TLS
|
|
|
|
USE_OPEN_SSL
|
2019-06-25 06:38:04 +08:00
|
|
|
)
|
|
|
|
|
2022-03-16 02:17:14 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ixwebsocket)
|
2022-05-07 07:29:05 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-06-25 06:38:04 +08:00
|
|
|
|
2022-05-07 07:29:05 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-06-25 06:38:04 +08:00
|
|
|
|
2023-06-17 11:50:42 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|