2020-04-04 01:14:40 +08:00
vcpkg_fail_port_install ( ON_ARCH "arm" ON_TARGET "uwp" )
2017-11-12 13:00:10 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O w a r m c a t / l i b w e b s o c k e t s
2021-03-20 00:52:31 +08:00
R E F 7 3 6 f 0 7 3 9 e d 8 c 7 5 d b 0 e 2 9 c 7 6 7 8 b 5 a 9 1 9 4 e 9 5 7 c 3 4 7 # v4.1.6
S H A 5 1 2 7 6 3 2 4 3 9 f 8 c d c 8 7 d 2 7 5 a 0 5 2 4 b 8 7 e a 5 c d 1 9 c 3 4 0 1 c 1 b 7 b b 7 f c f 6 7 3 e e f 3 e 1 a b 3 6 c 0 e c 0 2 2 d 2 d c e 0 5 0 d 0 7 b c 1 0 6 a f 3 1 6 6 5 7 5 8 8 2 5 0 7 a 5 6 a c 8 2 9 a 4 3 6 1 3 2 9 3 1 1 4 8 4 d c 2 c 5 c 4
2017-11-12 13:00:10 +08:00
H E A D _ R E F m a s t e r
2020-01-14 07:43:36 +08:00
P A T C H E S
C M a k e L i s t s . p a t c h
2020-10-07 16:33:46 +08:00
f i x - b u i l d - e r r o r . p a t c h
2017-01-13 01:20:32 +08:00
)
2017-11-12 13:00:10 +08:00
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC )
string ( COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED )
2017-11-11 20:27:31 +08:00
2020-01-14 07:43:36 +08:00
## All LWS options could be possible features:
# #
# # Major individual features
# #
# option(LWS_WITH_NETWORK "Compile with network-related code" ON)
# option(LWS_ROLE_H1 "Compile with support for http/1 (needed for ws)" ON)
# option(LWS_ROLE_WS "Compile with support for websockets" ON)
# option(LWS_ROLE_DBUS "Compile with support for DBUS" OFF)
# option(LWS_ROLE_RAW_PROXY "Raw packet proxy" OFF)
# option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON)
# option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF)
# option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
# option(LWS_IPV6 "Compile with support for ipv6" OFF)
# option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF)
# option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF)
# option(LWS_WITH_HTTP_PROXY "Support for HTTP proxying" OFF)
# option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF)
# option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF)
# option(LWS_WITH_GENERIC_SESSIONS "With the Generic Sessions plugin" OFF)
# option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF)
# option(LWS_WITH_ACCESS_LOG "Support generating Apache-compatible access logs" OFF)
# option(LWS_WITH_RANGES "Support http ranges (RFC7233)" OFF)
# option(LWS_WITH_SERVER_STATUS "Support json + jscript server monitoring" OFF)
# option(LWS_WITH_THREADPOOL "Managed worker thread pool support (relies on pthreads)" OFF)
# option(LWS_WITH_HTTP_STREAM_COMPRESSION "Support HTTP stream compression" OFF)
# option(LWS_WITH_HTTP_BROTLI "Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)" OFF)
# option(LWS_WITH_ACME "Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)" OFF)
# option(LWS_WITH_HUBBUB "Enable libhubbub rewriting support" OFF)
# option(LWS_WITH_FTS "Full Text Search support" OFF)
# #
# # TLS library options... all except mbedTLS are basically OpenSSL variants.
# #
# option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)" ON)
# option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF)
# option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF)
# option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF)
# option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF)
# option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON)
# #
# # Event library options (may select multiple, or none for default poll()
# #
# option(LWS_WITH_LIBEV "Compile with support for libev" OFF)
# option(LWS_WITH_LIBUV "Compile with support for libuv" OFF)
# option(LWS_WITH_LIBEVENT "Compile with support for libevent" OFF)
# #
# # Static / Dynamic build options
# #
# option(LWS_WITH_STATIC "Build the static version of the library" ON)
# option(LWS_WITH_SHARED "Build the shared version of the library" ON)
# option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF)
# option(LWS_STATIC_PIC "Build the static version of the library with position-independent code" OFF)
# #
# # Specific platforms
# #
# option(LWS_WITH_ESP32 "Build for ESP32" OFF)
# option(LWS_WITH_ESP32_HELPER "Build ESP32 helper" OFF)
# option(LWS_PLAT_OPTEE "Build for OPTEE" OFF)
# #
# # Client / Server / Test Apps build control
# #
# option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF)
# option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF)
# option(LWS_WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF)
# option(LWS_WITHOUT_TEST_SERVER "Don't build the test server" OFF)
# option(LWS_WITHOUT_TEST_SERVER_EXTPOLL "Don't build the test server version that uses external poll" OFF)
# option(LWS_WITHOUT_TEST_PING "Don't build the ping test application" OFF)
# option(LWS_WITHOUT_TEST_CLIENT "Don't build the client test application" OFF)
# #
# # Extensions (permessage-deflate)
# #
# option(LWS_WITHOUT_EXTENSIONS "Don't compile with extensions" ON)
# #
# # Helpers + misc
# #
# option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF)
# option(LWS_FALLBACK_GETHOSTBYNAME "Also try to do dns resolution using gethostbyname if getaddrinfo fails" OFF)
# option(LWS_WITHOUT_BUILTIN_SHA1 "Don't build the lws sha-1 (eg, because openssl will provide it" OFF)
# option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF)
# option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON)
# option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF)
# option(LWS_WITH_LEJP "With the Lightweight JSON Parser" ON)
# option(LWS_WITH_SQLITE3 "Require SQLITE3 support" OFF)
# option(LWS_WITH_STRUCT_JSON "Generic struct serialization to and from JSON" ON)
# option(LWS_WITH_STRUCT_SQLITE3 "Generic struct serialization to and from SQLITE3" OFF)
# option(LWS_WITH_SMTP "Provide SMTP support" OFF)
# if (WIN32 OR LWS_WITH_ESP32)
# option(LWS_WITH_DIR "Directory scanning api support" OFF)
# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF)
# else()
# option(LWS_WITH_DIR "Directory scanning api support" ON)
# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" ON)
# endif()
# option(LWS_WITH_NO_LOGS "Disable all logging from being compiled in" OFF)
# option(LWS_AVOID_SIGPIPE_IGN "Android 7+ reportedly needs this" OFF)
# option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF)
# option(LWS_WITH_JOSE "JSON Web Signature / Encryption / Keys (RFC7515/6/) API" OFF)
# option(LWS_WITH_GENCRYPTO "Enable support for Generic Crypto apis independent of TLS backend" OFF)
# option(LWS_WITH_SELFTESTS "Selftests run at context creation" OFF)
# option(LWS_WITH_GCOV "Build with gcc gcov coverage instrumentation" OFF)
# option(LWS_WITH_EXPORT_LWSTARGETS "Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project." ON)
# option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON)
# option(LWS_WITH_MINIMAL_EXAMPLES "Also build the normally standalone minimal examples, for QA" OFF)
# option(LWS_WITH_LWSAC "lwsac Chunk Allocation api" ON)
# option(LWS_WITH_CUSTOM_HEADERS "Store and allow querying custom HTTP headers (H1 only)" ON)
# option(LWS_WITH_DISKCACHE "Hashed cache directory with lazy LRU deletion to size limit" OFF)
# option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs libasan)" OFF)
# option(LWS_WITH_DIR "Directory scanning api support" OFF)
# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF)
# option(LWS_WITH_ZLIB "Include zlib support (required for extensions)" OFF)
# option(LWS_WITH_BUNDLED_ZLIB "Use bundled zlib version (Windows only)" ${LWS_WITH_BUNDLED_ZLIB_DEFAULT})
# option(LWS_WITH_MINIZ "Use miniz instead of zlib" OFF)
# option(LWS_WITH_DEPRECATED_LWS_DLL "Migrate to lws_dll2 instead ASAP" OFF)
# option(LWS_WITH_SEQUENCER "lws_seq_t support" ON)
# option(LWS_WITH_EXTERNAL_POLL "Support external POLL integration using callback messages (not recommended)" OFF)
# option(LWS_WITH_LWS_DSH "Support lws_dsh_t Disordered Shared Heap" OFF)
##
2016-09-19 11:50:08 +08:00
vcpkg_configure_cmake (
2016-09-29 08:05:56 +08:00
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
2019-08-01 04:01:02 +08:00
P R E F E R _ N I N J A
2016-09-19 11:50:08 +08:00
O P T I O N S
2017-11-12 13:00:10 +08:00
- D L W S _ W I T H _ S T A T I C = $ { L W S _ W I T H _ S T A T I C }
- D L W S _ W I T H _ S H A R E D = $ { L W S _ W I T H _ S H A R E D }
2020-10-21 01:58:22 +08:00
- D L W S _ W I T H _ G E N C R Y P T O = O N
- D L W S _ W I T H _ T L S = O N
2020-04-04 01:14:40 +08:00
- D L W S _ W I T H _ B U N D L E D _ Z L I B = O F F
2016-09-19 11:50:08 +08:00
- D L W S _ W I T H O U T _ T E S T A P P S = O N
- D L W S _ I P V 6 = O N
2020-04-04 01:14:40 +08:00
- D L W S _ W I T H _ H T T P 2 = O N
2020-01-14 07:43:36 +08:00
- D L W S _ W I T H _ H T T P _ S T R E A M _ C O M P R E S S I O N = O N # Since zlib is already a dependency
2020-02-14 11:04:40 +08:00
- D L W S _ W I T H _ L I B U V = O N
2016-09-19 11:50:08 +08:00
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_install_cmake ( )
2020-10-07 16:33:46 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH cmake )
2019-06-18 02:32:15 +08:00
else ( )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
vcpkg_fixup_cmake_targets ( CONFIG_PATH lib/cmake/libwebsockets )
2019-06-18 02:32:15 +08:00
endif ( )
2017-11-12 13:00:10 +08:00
2016-09-19 11:50:08 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2018-01-19 13:11:48 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /share/libwebsockets-test-server )
2020-10-07 16:33:46 +08:00
file ( READ ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/libwebsockets-config.cmake LIBWEBSOCKETSCONFIG_CMAKE )
2018-01-19 13:11:48 +08:00
string ( REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}" )
2020-10-07 16:33:46 +08:00
file ( WRITE ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/libwebsockets-config.cmake "${LIBWEBSOCKETSCONFIG_CMAKE}" )
2018-01-19 13:11:48 +08:00
file ( READ ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/LibwebsocketsTargets-debug.cmake LIBWEBSOCKETSTARGETSDEBUG_CMAKE )
string ( REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}" )
file ( WRITE ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/LibwebsocketsTargets-debug.cmake "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}" )
file ( READ ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE )
string ( REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}" )
file ( WRITE ${ CURRENT_PACKAGES_DIR } /share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}" )
2020-04-04 01:14:40 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )
2018-01-19 13:11:48 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
2020-04-04 01:14:40 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
2019-06-18 02:32:15 +08:00
file ( RENAME ${ CURRENT_PACKAGES_DIR } /debug/lib/websockets_static.lib ${ CURRENT_PACKAGES_DIR } /debug/lib/websockets.lib )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /lib/websockets_static.lib ${ CURRENT_PACKAGES_DIR } /lib/websockets.lib )
endif ( )
2018-01-19 13:11:48 +08:00
endif ( )
2016-09-19 11:50:08 +08:00
vcpkg_copy_pdbs ( )