2016-10-27 07:45:41 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2016-11-09 06:38:47 +08:00
|
|
|
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
2016-10-27 07:45:41 +08:00
|
|
|
endif()
|
2016-09-19 11:50:08 +08:00
|
|
|
include(vcpkg_common_functions)
|
2016-09-29 08:05:56 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebsockets-2.0.0)
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2016-09-25 06:23:04 +08:00
|
|
|
URLS "https://github.com/warmcat/libwebsockets/archive/v2.0.0.zip"
|
2016-09-19 11:50:08 +08:00
|
|
|
FILENAME "libwebsockets-v2.0.0.zip"
|
2016-09-23 04:13:09 +08:00
|
|
|
SHA512 bf57a46f2c60095e7e6ec6656b185ffd2cf8f553bc22255ae8f6825d3613316d794f139cdefacbdf60ef997b0cd675fe356813d406c9b7c5a5ae838ce5326042
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-09-29 08:05:56 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2016-09-19 11:50:08 +08:00
|
|
|
OPTIONS
|
|
|
|
-DLWS_WITH_STATIC=OFF
|
|
|
|
-DLWS_USE_BUNDLED_ZLIB=OFF
|
|
|
|
-DLWS_WITHOUT_TESTAPPS=ON
|
|
|
|
-DLWS_IPV6=ON
|
|
|
|
-DLWS_HTTP2=ON
|
|
|
|
# OPTIONS_RELEASE -DOPTIMIZE=1
|
|
|
|
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
|
|
|
|
file(RENAME
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/cmake/LibwebsocketsTargets-debug.cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake
|
|
|
|
)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
|
|
|
|
|
2016-09-29 08:05:56 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
|
2016-09-19 11:50:08 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright)
|
|
|
|
vcpkg_copy_pdbs()
|