Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"en-US,en;q\u003d0.5", "gen_ut":1733361808, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"0922566ea07e9c26640c8d64bfb5859d", "oid":{ "oid": "6328231f2aa628632344d96a58e25c3b194af506", "alias": [ "refs/heads/main"]},"blobname": "CMakeLists.txt", "blob": "#\n# libwebsockets - small server side websockets and web server implementation\n#\n# Copyright (C) 2010 - 2022 Andy Green \u003candy@warmcat.com\u003e\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \u0022Software\u0022), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \u0022AS IS\u0022, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\nif (PICO_SDK_PATH)\n\tcmake_minimum_required(VERSION 3.13)\nelse()\n\tcmake_minimum_required(VERSION 3.5)\nendif()\ninclude(CheckFunctionExists)\ninclude(CheckSymbolExists)\ninclude(CheckIncludeFile)\ninclude(CheckIncludeFiles)\ninclude(CheckLibraryExists)\ninclude(CheckTypeSize)\ninclude(CheckCSourceCompiles)\nif (PICO_SDK_PATH)\n\tinclude(cmake/pico_sdk_import.cmake)\nendif()\n\n\nif (POLICY CMP0048)\n\tcmake_policy(SET CMP0048 NEW)\nendif()\n\n#if (POLICY CMP0024)\n#\tcmake_policy(SET CMP0024 NEW)\n#endif()\n\nif (POLICY CMP0075)\n\tcmake_policy(SET CMP0075 NEW)\nendif()\n\n# General Advice\n#\n# For selecting between DEBUG / RELEASE, use -DCMAKE_BUILD_TYPE\u003dDEBUG or \u003dRELEASE\n# debug builds include source level debug info and extra logging\n\nset(LWS_WITH_BUNDLED_ZLIB_DEFAULT OFF)\nif(WIN32)\n\tset(LWS_WITH_BUNDLED_ZLIB_DEFAULT ON)\nendif()\n\nset(LWS_ROLE_RAW 1)\nset(LWS_WITH_POLL 1)\n\nif (ESP_PLATFORM)\n\tset(LWS_ESP_PLATFORM 1)\n\t#set(CMAKE_TOOLCHAIN_FILE contrib/cross-esp32.cmake)\n\tset(LWIP_PROVIDE_ERRNO 1)\nendif()\n\n# it's at this point any toolchain file is brought in\nproject(libwebsockets C)\nif (LWS_WITH_SECURE_STREAMS_CPP)\n\tenable_language(CXX)\nendif()\ninclude(CTest)\n\nif (PICO_SDK_PATH)\n\tpico_sdk_init()\nendif()\n\nif (ESP_PLATFORM)\n include_directories(\n\t\t$ENV{IDF_PATH}/components/esp_hw_support/include/soc/\n\t\t$ENV{IDF_PATH}/components/freertos/include/\n\t\t$ENV{IDF_PATH}/components/lwip/include/\n\t\t$ENV{IDF_PATH}/components/freertos/esp_additions/include/\n\t\t$ENV{IDF_PATH}/components/freertos/esp_additions/include/freertos/\n\t\t$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/\n\t\t$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/portable/linux/include/\n\t\t$ENV{IDF_PATH}/components/xtensa/${CONFIG_IDF_TARGET}/include/\n\t\t$ENV{IDF_PATH}/components/freertos/include/esp_additions\n\t\t$ENV{IDF_PATH}/components/hal/include\n\t\t$ENV{IDF_PATH}/components/soc/${CONFIG_IDF_TARGET}/include/\n\t\t$ENV{IDF_PATH}/components/soc/include/\n\t\t$ENV{IDF_PATH}/components/esp_hw_support/include\n\t\t$ENV{IDF_PATH}/components/hal/${CONFIG_IDF_TARGET}/include/\n\t\t$ENV{IDF_PATH}/components/app_update/include/\n\t\t$ENV{IDF_PATH}/components/bootloader_support/include\n\t\t$ENV{IDF_PATH}/components/lwip/port/include\n\t\t$ENV{IDF_PATH}/components/lwip/port/freertos/include\n\t\t$ENV{IDF_PATH}/components/lwip/port/esp32xx/include\n\t\t$ENV{IDF_PATH}/components/freertos/config/include/freertos/\n\t\t$ENV{IDF_PATH}/components/freertos/config/${CONFIG_IDF_TARGET_ARCH}/include\n\t\t$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/portable/${CONFIG_IDF_TARGET_ARCH}/include\n\t\t$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/portable/${CONFIG_IDF_TARGET_ARCH}/include/freertos\n\t\t$ENV{IDF_PATH}/components/freertos/config/include\n\t\t$ENV{IDF_PATH}/components/esp_driver_gpio/include\n\t\t$ENV{IDF_PATH}/components/esp_driver_spi/include\n\t\t$ENV{IDF_PATH}/components/esp_driver_ledc/include\n\t\t$ENV{IDF_PATH}/components/esp_partition/include\n\t\t$ENV{IDF_PATH}/components/spi_flash/include\n\t\t$ENV{IDF_PATH}/components/esp_app_format/include\n\t\t$ENV{IDF_PATH}/components/esp_bootloader_format/include\n\t\t$ENV{IDF_PATH}/components/esp_system/include/\n\t)\n\n\tif (CONFIG_IDF_TARGET_ARCH_RISCV)\n include_directories(\n $ENV{IDF_PATH}/components/freertos/port/riscv/include\n $ENV{IDF_PATH}/components/riscv/include)\n else()\n include_directories(\n $ENV{IDF_PATH}/components/freertos/port/xtensa/include\n $ENV{IDF_PATH}/components/xtensa/include)\n endif()\n\nendif()\n\n\n#\n# Select features recommended for PC distro packaging\n#\noption(LWS_WITH_DISTRO_RECOMMENDED \u0022Enable features recommended for distro packaging\u0022 OFF)\noption(LWS_FOR_GITOHASHI \u0022Enable features recommended for use with gitohashi\u0022 OFF)\n\n#\n# Compiler features\n#\noption(DISABLE_WERROR \u0022Avoid treating compiler warnings as fatal errors\u0022 OFF)\n\n#\n# Major individual features\n#\noption(LWS_WITH_NETWORK \u0022Compile with network-related code\u0022 ON)\noption(LWS_ROLE_H1 \u0022Compile with support for http/1 (needed for ws)\u0022 ON)\noption(LWS_ROLE_WS \u0022Compile with support for websockets\u0022 ON)\noption(LWS_ROLE_MQTT \u0022Build with support for MQTT client\u0022 OFF)\noption(LWS_ROLE_DBUS \u0022Compile with support for DBUS\u0022 OFF)\noption(LWS_ROLE_RAW_PROXY \u0022Raw packet proxy\u0022 OFF)\noption(LWS_ROLE_RAW_FILE \u0022Compile with support for raw files\u0022 ON)\noption(LWS_WITH_HTTP2 \u0022Compile with server support for HTTP/2\u0022 ON)\noption(LWS_WITH_LWSWS \u0022Libwebsockets Webserver\u0022 OFF)\noption(LWS_WITH_CGI \u0022Include CGI (spawn process with network-connected stdin/out/err) APIs\u0022 OFF)\noption(LWS_IPV6 \u0022Compile with support for ipv6\u0022 OFF)\noption(LWS_UNIX_SOCK \u0022Compile with support for UNIX domain socket if OS supports it\u0022 ON)\noption(LWS_WITH_PLUGINS \u0022Support plugins for protocols and extensions (implies LWS_WITH_PLUGINS_API)\u0022 OFF)\noption(LWS_WITH_PLUGINS_BUILTIN \u0022Build the plugin protocols directly into lws library\u0022 OFF)\noption(LWS_WITH_HTTP_PROXY \u0022Support for active HTTP proxying\u0022 OFF)\noption(LWS_WITH_ZIP_FOPS \u0022Support serving pre-zipped files\u0022 OFF)\noption(LWS_WITH_SOCKS5 \u0022Allow use of SOCKS5 proxy on client connections\u0022 OFF)\noption(LWS_WITH_PEER_LIMITS \u0022Track peers and restrict resources a single peer can allocate\u0022 OFF)\noption(LWS_WITH_ACCESS_LOG \u0022Support generating Apache-compatible access logs\u0022 OFF)\noption(LWS_WITH_RANGES \u0022Support http ranges (RFC7233)\u0022 OFF)\noption(LWS_WITH_THREADPOOL \u0022Managed worker thread pool support (relies on pthreads)\u0022 OFF)\noption(LWS_WITH_HTTP_STREAM_COMPRESSION \u0022Support HTTP stream compression\u0022 OFF)\noption(LWS_WITH_HTTP_BROTLI \u0022Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)\u0022 OFF)\noption(LWS_WITH_ACME \u0022Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)\u0022 OFF)\noption(LWS_WITH_HUBBUB \u0022Enable libhubbub rewriting support\u0022 OFF)\noption(LWS_WITH_ALSA \u0022Enable alsa audio example\u0022 OFF)\noption(LWS_WITH_GTK \u0022Enable gtk example\u0022 OFF)\noption(LWS_WITH_FTS \u0022Full Text Search support\u0022 OFF)\noption(LWS_WITH_SYS_ASYNC_DNS \u0022Nonblocking internal IPv4 + IPv6 DNS resolver\u0022 OFF)\noption(LWS_WITH_SYS_NTPCLIENT \u0022Build in tiny ntpclient good for tls date validation and run via lws_system\u0022 OFF)\noption(LWS_WITH_SYS_DHCP_CLIENT \u0022Build in tiny DHCP client\u0022 OFF)\noption(LWS_WITH_HTTP_BASIC_AUTH \u0022Support Basic Auth\u0022 ON)\noption(LWS_WITH_HTTP_DIGEST_AUTH \u0022Support Digest Auth (caution deprecated crypto)\u0022 ON)\noption(LWS_WITH_HTTP_UNCOMMON_HEADERS \u0022Include less common http header support\u0022 ON)\noption(LWS_WITH_SYS_STATE \u0022lws_system state support\u0022 ON)\noption(LWS_WITH_SYS_SMD \u0022Lws System Message Distribution\u0022 ON)\noption(LWS_WITH_SYS_FAULT_INJECTION \u0022Enable fault injection support\u0022 OFF)\noption(LWS_WITH_SYS_METRICS \u0022Lws Metrics API\u0022 OFF)\noption(LWS_WITH_UPNG \u0022Enable stateful PNG stream decoder\u0022 ON)\noption(LWS_WITH_GZINFLATE \u0022Enable internal minimal gzip inflator\u0022 ON)\noption(LWS_WITH_JPEG \u0022Enable stateful JPEG stream decoder\u0022 ON)\noption(LWS_WITH_DLO \u0022Enable Display List Objects\u0022 ON)\n\n#\n# Secure Streams\n#\noption(LWS_WITH_SECURE_STREAMS \u0022Secure Streams protocol-agnostic API\u0022 ON)\noption(LWS_WITH_SECURE_STREAMS_CPP \u0022Secure Streams C++ classes\u0022 OFF)\noption(LWS_WITH_SECURE_STREAMS_PROXY_API \u0022Secure Streams support to work across processes\u0022 OFF)\noption(LWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM \u0022Auth support for api.amazon.com\u0022 OFF)\noption(LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY \u0022Secure Streams Policy is hardcoded only\u0022 OFF)\noption(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4 \u0022Secure Streams Auth support for AWS Sigv4\u0022 OFF)\noption(LWS_WITH_SECURE_STREAMS_BUFFER_DUMP \u0022Secure Streams protocol buffer dump\u0022 OFF)\noption(LWS_WITH_SS_DIRECT_PROTOCOL_STR \u0022Secure Streams directly set/get metadata w/o policy\u0022 OFF)\noption(LWS_ONLY_SSPC \u0022Remove everything from library except standalone SSPC client support\u0022 OFF)\n\n#\n# CTest options\n#\n#\n# If you build with LWS_WITH_MINIMAL_EXAMPLES, you can use CTest / make test to run\n# examples that can give a pass/fail response. By default it runs tests both against\n# a local server peer and warmcat.com, if your CI wants to do the tests but does not\n# have internet routing, then you can still run a subset of tests with CTest / make\n# test that only does local tests by disabling this option.\n#\noption(LWS_CTEST_INTERNET_AVAILABLE \u0022CTest will performs tests that need the Internet\u0022 ON)\n\n#\n# TLS library options... all except mbedTLS are basically OpenSSL variants.\n#\noption(LWS_WITH_SSL \u0022Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)\u0022 ON)\noption(LWS_WITH_MBEDTLS \u0022Use mbedTLS (\u003e\u003d2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS\u0022 OFF)\noption(LWS_WITH_BORINGSSL \u0022Use BoringSSL replacement for OpenSSL\u0022 OFF)\noption(LWS_WITH_CYASSL \u0022Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS\u0022 OFF)\noption(LWS_WITH_WOLFSSL \u0022Use wolfSSL replacement for OpenSSL. When setting this, you also may need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS\u0022 OFF)\noption(LWS_SSL_CLIENT_USE_OS_CA_CERTS \u0022SSL support should make use of the OS-installed CA root certs\u0022 ON)\noption(LWS_TLS_LOG_PLAINTEXT_RX \u0022For debugging log the received plaintext as soon as decrypted\u0022 OFF)\noption(LWS_TLS_LOG_PLAINTEXT_TX \u0022For debugging log the transmitted plaintext just before encryption\u0022 OFF)\noption(LWS_WITH_TLS_SESSIONS \u0022Enable persistent, resumable TLS sessions\u0022 ON)\noption(LWS_WITH_TLS_JIT_TRUST \u0022Enable dynamically computing which trusted TLS CA is needed to be instantiated\u0022 OFF)\n\n#\n# Event library options (may select multiple, or none for default poll()\n#\noption(LWS_WITH_LIBEV \u0022Compile with support for libev\u0022 OFF)\noption(LWS_WITH_LIBUV \u0022Compile with support for libuv\u0022 OFF)\noption(LWS_WITH_LIBEVENT \u0022Compile with support for libevent\u0022 OFF)\noption(LWS_WITH_GLIB \u0022Compile with support for glib event loop\u0022 OFF)\noption(LWS_WITH_SDEVENT \u0022Compile with support for sd-event loop\u0022 OFF)\noption(LWS_WITH_ULOOP \u0022Compile with support for uloop\u0022 OFF)\n\nif (UNIX)\n# since v4.1, on unix platforms default is build any event libs as runtime plugins\noption(LWS_WITH_EVLIB_PLUGINS \u0022Compile event lib support into runtime-selected plugins\u0022 ON)\nelse()\n# otherwise default to linking the event lib(s) to libwebsockets.so\noption(LWS_WITH_EVLIB_PLUGINS \u0022Compile event lib support into runtime-selected plugins\u0022 OFF)\nendif()\n#\n# LWS Drivers\n#\n\noption(LWS_WITH_DRIVERS \u0022With generic drivers for gpio, i2c, display etc\u0022 OFF)\n\n#\n# Static / Dynamic build options\n#\noption(LWS_WITH_STATIC \u0022Build the static version of the library\u0022 ON)\noption(LWS_WITH_SHARED \u0022Build the shared version of the library\u0022 ON)\noption(LWS_LINK_TESTAPPS_DYNAMIC \u0022Link the test apps to the shared version of the library. Default is to link statically\u0022 OFF)\noption(LWS_STATIC_PIC \u0022Build the static version of the library with position-independent code\u0022 OFF)\noption(LWS_SUPPRESS_DEPRECATED_API_WARNINGS \u0022Turn off complaints about, eg, openssl 3 deprecated api usage\u0022 ON)\n\n#\n# Specific platforms\n#\noption(LWS_WITH_ESP32 \u0022Build for ESP32\u0022 OFF)\noption(LWS_PLAT_OPTEE \u0022Build for OPTEE\u0022 OFF)\noption(LWS_PLAT_FREERTOS \u0022Build for FreeRTOS\u0022 OFF)\noption(LWS_PLAT_ANDROID \u0022Android flavour of unix platform\u0022 OFF)\noption(LWS_PLAT_BAREMETAL \u0022Build for deeply embedded baremetal\u0022 OFF)\n\n#\n# Client / Server / Test Apps build control\n#\noption(LWS_WITHOUT_CLIENT \u0022Don't build the client part of the library\u0022 OFF)\noption(LWS_WITHOUT_SERVER \u0022Don't build the server part of the library\u0022 OFF)\noption(LWS_WITHOUT_TESTAPPS \u0022Don't build the libwebsocket-test-apps\u0022 OFF)\noption(LWS_WITHOUT_TEST_SERVER \u0022Don't build the test server\u0022 OFF)\noption(LWS_WITHOUT_TEST_SERVER_EXTPOLL \u0022Don't build the test server version that uses external poll\u0022 OFF)\noption(LWS_WITHOUT_TEST_PING \u0022Don't build the ping test application\u0022 OFF)\noption(LWS_WITHOUT_TEST_CLIENT \u0022Don't build the client test application\u0022 OFF)\n#\n# Extensions (permessage-deflate)\n#\noption(LWS_WITHOUT_EXTENSIONS \u0022Don't compile with extensions\u0022 ON)\n#\n# Helpers + misc\n#\noption(LWS_WITHOUT_BUILTIN_GETIFADDRS \u0022Don'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.\u0022 OFF)\noption(LWS_FALLBACK_GETHOSTBYNAME \u0022Also try to do dns resolution using gethostbyname if getaddrinfo fails\u0022 OFF)\noption(LWS_WITHOUT_BUILTIN_SHA1 \u0022Don't build the lws sha-1 (eg, because openssl will provide it\u0022 OFF)\noption(LWS_WITHOUT_DAEMONIZE \u0022Don't build the daemonization api\u0022 ON)\noption(LWS_SSL_SERVER_WITH_ECDH_CERT \u0022Include SSL server use ECDH certificate\u0022 OFF)\noption(LWS_WITH_LEJP \u0022With the Lightweight JSON Parser\u0022 ON)\noption(LWS_WITH_CBOR \u0022With the Lightweight LECP CBOR Parser\u0022 OFF)\noption(LWS_WITH_CBOR_FLOAT \u0022Build floating point types if building CBOR LECP\u0022 ON)\noption(LWS_WITH_SQLITE3 \u0022Require SQLITE3 support\u0022 OFF)\noption(LWS_WITH_LHP \u0022With the Lightweight HTML5 parser\u0022 ON)\noption(LWS_WITH_STRUCT_JSON \u0022Generic struct serialization to and from JSON\u0022 OFF)\noption(LWS_WITH_STRUCT_SQLITE3 \u0022Generic struct serialization to and from SQLITE3\u0022 OFF)\noption(LWS_WITH_JSONRPC \u0022JSON RPC support\u0022 ON)\n# broken atm\n#option(LWS_WITH_SMTP \u0022Provide SMTP support\u0022 OFF)\nif (LWS_WITH_ESP32)\noption(LWS_WITH_DIR \u0022Directory scanning api support\u0022 OFF)\noption(LWS_WITH_LEJP_CONF \u0022With LEJP configuration parser as used by lwsws\u0022 OFF)\nelse()\noption(LWS_WITH_DIR \u0022Directory scanning api support\u0022 ON)\noption(LWS_WITH_LEJP_CONF \u0022With LEJP configuration parser as used by lwsws\u0022 ON)\nendif()\noption(LWS_WITH_NO_LOGS \u0022Disable all logging other than _err and _user from being compiled in\u0022 OFF)\nset(LWS_LOGGING_BITFIELD_SET 0 CACHE STRING \u0022Bitfield describing which log levels to force included into the build\u0022)\nset(LWS_LOGGING_BITFIELD_CLEAR 0 CACHE STRING \u0022Bitfield describing which log levels to force removed from the build\u0022)\noption(LWS_LOGS_TIMESTAMP \u0022Timestamp at start of logs\u0022 ON)\noption(LWS_LOG_TAG_LIFECYCLE \u0022Log tagged object lifecycle as NOTICE\u0022 ON)\noption(LWS_AVOID_SIGPIPE_IGN \u0022Android 7+ reportedly needs this\u0022 OFF)\noption(LWS_WITH_JOSE \u0022JOSE JSON Web Signature / Encryption / Keys (RFC7515/6/) API\u0022 OFF)\noption(LWS_WITH_COSE \u0022COSE CBOR Signature / Encryption / Keys (RFC8152) API\u0022 OFF)\noption(LWS_WITH_GENCRYPTO \u0022Enable support for Generic Crypto apis independent of TLS backend\u0022 OFF)\noption(LWS_WITH_SELFTESTS \u0022Selftests run at context creation\u0022 OFF)\noption(LWS_WITH_GCOV \u0022Build with gcc gcov coverage instrumentation\u0022 OFF)\noption(LWS_WITH_EXPORT_LWSTARGETS \u0022Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project.\u0022 ON)\noption(LWS_REPRODUCIBLE \u0022Build libwebsockets reproducible. It removes the build user and hostname from the build\u0022 ON)\nif (ESP_PLATFORM OR LWS_WITH_ESP32 OR LWS_PLAT_BAREMETAL OR LWS_PLAT_FREERTOS)\noption(LWS_WITH_MINIMAL_EXAMPLES \u0022Also build the normally standalone minimal examples, for QA\u0022 OFF)\nelse()\noption(LWS_WITH_MINIMAL_EXAMPLES \u0022Also build the normally standalone minimal examples, for QA\u0022 ON)\nendif()\noption(LWS_WITH_LWSAC \u0022lwsac Chunk Allocation api\u0022 ON)\noption(LWS_WITH_CUSTOM_HEADERS \u0022Store and allow querying custom HTTP headers (H1 only)\u0022 ON)\noption(LWS_WITH_DISKCACHE \u0022Hashed cache directory with lazy LRU deletion to size limit (unrelated to lws_cache_ttl)\u0022 OFF)\noption(LWS_WITH_ASAN \u0022Build with gcc runtime sanitizer options enabled (needs libasan)\u0022 OFF)\noption(LWS_WITH_LEJP_CONF \u0022With LEJP configuration parser as used by lwsws\u0022 OFF)\noption(LWS_WITH_ZLIB \u0022Include zlib support (required for extensions)\u0022 OFF)\noption(LWS_WITH_BUNDLED_ZLIB \u0022Use bundled zlib version (Windows only)\u0022 ${LWS_WITH_BUNDLED_ZLIB_DEFAULT})\noption(LWS_WITH_MINIZ \u0022Use miniz instead of zlib\u0022 OFF)\noption(LWS_WITH_EXTERNAL_POLL \u0022Support external POLL integration using callback messages (not recommended)\u0022 OFF)\noption(LWS_WITH_LWS_DSH \u0022Support lws_dsh_t Disordered Shared Heap\u0022 OFF)\noption(LWS_CLIENT_HTTP_PROXYING \u0022Support external http proxies for client connections\u0022 ON)\noption(LWS_WITH_FILE_OPS \u0022Support file operations vfs\u0022 ON)\noption(LWS_WITH_UDP \u0022Platform supports UDP\u0022 ON)\noption(LWS_WITH_SPAWN \u0022Spawn subprocesses with piped stdin/out/stderr\u0022 OFF)\noption(LWS_WITH_FSMOUNT \u0022Overlayfs and fallback mounting apis\u0022 OFF)\noption(LWS_WITH_FANALYZER \u0022Enable gcc -fanalyzer if compiler supports\u0022 OFF)\noption(LWS_HTTP_HEADERS_ALL \u0022Override header reduction optimization and include all like older lws versions\u0022 OFF)\noption(LWS_WITH_SUL_DEBUGGING \u0022Enable zombie lws_sul checking on object deletion\u0022 OFF)\noption(LWS_WITH_PLUGINS_API \u0022Build generic lws_plugins apis (see LWS_WITH_PLUGINS to also build protocol plugins)\u0022 OFF)\noption(LWS_WITH_CONMON \u0022Collect introspectable connection latency stats on individual client connections\u0022 ON)\noption(LWS_WITH_WOL \u0022Wake On Lan support\u0022 ON)\noption(LWS_WITHOUT_EVENTFD \u0022Force using pipe instead of eventfd\u0022 OFF)\nif (UNIX OR WIN32)\n\toption(LWS_WITH_CACHE_NSCOOKIEJAR \u0022Build file-backed lws-cache-ttl that uses netscape cookie jar format (linux-only)\u0022 ON)\nelse()\n\toption(LWS_WITH_CACHE_NSCOOKIEJAR \u0022Build file-backed lws-cache-ttl that uses netscape cookie jar format (linux-only)\u0022 OFF)\nendif()\n\nif (${CMAKE_SYSTEM_NAME} MATCHES \u0022Linux\u0022)\n\toption(LWS_WITH_NETLINK \u0022Monitor Netlink for Routing Table changes\u0022 ON)\n\toption(LWS_WITH_BINDTODEVICE \u0022Use bind to interface socket option\u0022 ON)\n\toption(LWS_WITH_LIBCAP \u0022Enable libcap\u0022 ON)\nelse()\n\tset(LWS_WITH_NETLINK 0)\n\tset(LWS_WITH_BINDTODEVICE 0)\n\tset(LWS_WITH_LIBCAP OFF)\nendif()\noption(LWS_WITH_MCUFONT_ENCODER \u0022Build the ttf to mcufont encoder\u0022 OFF)\n\n#\n# Compressed backtraces\n#\noption(LWS_WITH_COMPRESSED_BACKTRACES \u0022Build with support for compressed backtraces\u0022 OFF)\nset(LWS_COMPRESSED_BACKTRACES_SNIP_PRE 2 CACHE STRING \u0022Amount of callstack to snip from top\u0022)\nset(LWS_COMPRESSED_BACKTRACES_SNIP_POST 1 CACHE STRING \u0022Amount of callstack to snip from bottom\u0022)\noption(LWS_WITH_ALLOC_METADATA_LWS \u0022Build lws_*alloc() with compressed backtraces (requires WITH_COMPRESSED_BACKTRACES)\u0022 OFF)\n\n#\n# Over The Air updates\n#\noption(LWS_WITH_OTA \u0022Build with support for Over The Air update download and validation\u0022 OFF)\nset(LWS_OTA_VARIANT \u0022set-LWS_OTA_VARIANT\u0022 CACHE STRING \u0022Build Variant ID for OTA filtering\u0022)\nset(LWS_OTA_PUBLIC_JWK_FILE \u0022$ENV{HOME}/.lws_ota/libwebsockets.org-ota-v1.public.jwk\u0022 CACHE STRING \u0022Filepath of public JWK used to validate packages\u0022)\nif (LWS_WITH_OTA)\n\tfile(READ ${LWS_OTA_PUBLIC_JWK_FILE} LWS_OTA_PUBLIC_JWK)\nendif()\n\n\nif (${CMAKE_SYSTEM_NAME} MATCHES \u0022SunOS\u0022)\n # its openssl has md5 deprecated\n set(LWS_SUPPRESS_DEPRECATED_API_WARNINGS 1)\nendif()\n\n\n#\n# to use miniz, enable both LWS_WITH_ZLIB and LWS_WITH_MINIZ\n#\n# End of user settings\n#\n\n# sets of sub-options implied by other options\n#\nset(LIB_LIST \u0022\u0022)\nset(LIB_LIST_AT_END)\nset(LWS_LIBRARIES)\nset(LWS_OPENSSL_SUPPORT 0)\ninclude(CMakeLists-implied-options.txt)\n\n#\n# Structural helpers for cmake in subdirs\n#\n\nmacro(add_subdir_include_directories arg1)\n\tadd_subdirectory(${arg1})\n\tinclude_directories(${_CMAKE_INC_LIST})\nendmacro()\n\nmacro(exports_to_parent_scope)\n\tset(SOURCES ${SOURCES} PARENT_SCOPE)\n\tif (LIB_LIST)\n\t\tset(LIB_LIST ${LIB_LIST} PARENT_SCOPE)\n\tendif()\n\tget_property(_CURR DIRECTORY PROPERTY INCLUDE_DIRECTORIES) \n\tset(_CMAKE_INC_LIST ${_CURR} PARENT_SCOPE)\n\tif (LWS_LIB_BUILD_INC_PATHS)\n\t\tset(LWS_LIB_BUILD_INC_PATHS ${LWS_LIB_BUILD_INC_PATHS} PARENT_SCOPE)\n\tendif()\nendmacro()\n\nmacro(export_to_parent_intermediate)\n\tset(SOURCES ${SOURCES} PARENT_SCOPE)\n\tif (LIB_LIST)\n\t\tset(LIB_LIST ${LIB_LIST} PARENT_SCOPE)\n\tendif()\n\tset(_CMAKE_INC_LIST ${_CMAKE_INC_LIST} PARENT_SCOPE)\n\tif (LWS_LIB_BUILD_INC_PATHS)\n\t\tset(LWS_LIB_BUILD_INC_PATHS ${LWS_LIB_BUILD_INC_PATHS} PARENT_SCOPE)\n\tendif()\nendmacro()\n\n#\n# Try to find the current Git hash\n#\n\nfind_package(Git)\nif(GIT_EXECUTABLE)\n\texecute_process(\n\t\tWORKING_DIRECTORY \u0022${CMAKE_CURRENT_SOURCE_DIR}\u0022\n\t\tCOMMAND \u0022${GIT_EXECUTABLE}\u0022 describe --tags --always\n\t\tOUTPUT_VARIABLE GIT_HASH\n\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t)\n\tset(LWS_BUILD_HASH ${GIT_HASH})\n\n\t# append the build user and hostname\n\tif (NOT LWS_REPRODUCIBLE)\n\t\texecute_process(\n\t\t\tWORKING_DIRECTORY \u0022${CMAKE_CURRENT_SOURCE_DIR}\u0022\n\t\t\tCOMMAND \u0022whoami\u0022\n\t\t\tOUTPUT_VARIABLE GIT_USER\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t\t)\n\t\texecute_process(\n\t\t\tWORKING_DIRECTORY \u0022${CMAKE_CURRENT_SOURCE_DIR}\u0022\n\t\t\tCOMMAND \u0022hostname\u0022\n\t\t\tOUTPUT_VARIABLE GIT_HOST\n\t\t\tOUTPUT_STRIP_TRAILING_WHITESPACE\n\t\t\t)\n\t\tstring(REGEX REPLACE \u0022([^\u005c\u005c])[\u005c\u005c]([^\u005c\u005c])\u0022 \u0022\u005c\u005c1\u005c\u005c\u005c\u005c\u005c\u005c\u005c\u005c\u005c\u005c2\u0022 GIT_USER ${GIT_USER})\n\t\tset(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})\n\tendif()\n\n\tmessage(\u0022Git commit hash: ${LWS_BUILD_HASH}\u0022)\nendif()\n\nif (\u0022${LWS_BUILD_HASH}\u0022 STREQUAL \u0022\u0022)\n\tset(LWS_BUILD_HASH \u0022unknown\u0022)\nendif()\n\nset(PACKAGE \u0022libwebsockets\u0022)\nset(CPACK_RPM_PACKAGE_LICENSE \u0022MIT\u0022)\nset(CPACK_PACKAGE_NAME \u0022${PACKAGE}\u0022)\nset(CPACK_PACKAGE_VERSION_MAJOR \u00224\u0022)\nset(CPACK_PACKAGE_VERSION_MINOR \u00223\u0022)\nset(CPACK_PACKAGE_VERSION_PATCH_NUMBER \u002299\u0022)\n\nset(CPACK_PACKAGE_VERSION_PATCH \u0022${CPACK_PACKAGE_VERSION_PATCH_NUMBER}-${LWS_BUILD_HASH}\u0022)\nset(CPACK_PACKAGE_RELEASE 1)\n\nset(CPACK_PACKAGE_VERSION \u0022${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\u0022)\nset(CPACK_PACKAGE_VENDOR \u0022andy@warmcat.com\u0022)\nset(CPACK_PACKAGE_CONTACT \u0022andy@warmcat.com\u0022)\nset(CPACK_PACKAGE_DESCRIPTION_SUMMARY \u0022${PACKAGE} ${CPACK_PACKAGE_VERSION}\u0022)\nset(SOVERSION \u002219\u0022)\nif(NOT CPACK_GENERATOR)\n if(UNIX)\n set(CPACK_GENERATOR \u0022TGZ\u0022)\n else()\n set(CPACK_GENERATOR \u0022ZIP\u0022)\n endif()\nendif()\nset(CPACK_SOURCE_GENERATOR \u0022TGZ\u0022)\nset(CPACK_SOURCE_PACKAGE_FILE_NAME \u0022${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}\u0022)\nset(VERSION \u0022${CPACK_PACKAGE_VERSION}\u0022)\n\nset(CPACK_RPM_PACKAGE_RELEASE_DIST ON)\nset(CPACK_RPM_FILE_NAME \u0022RPM-DEFAULT\u0022)\n# below makes path length problems in CI\nset(CPACK_RPM_DEBUGINFO_PACKAGE OFF)\n# below makes some kind of chimera rpm with binaries and sources\nset(CPACK_RPM_PACKAGE_SOURCES OFF)\nset(CPACK_RPM_INSTALL_WITH_EXEC ON)\nset(CPACK_RPM_COMPONENT_INSTALL ON)\n\nset(CPACK_DEBIAN_FILE_NAME \u0022DEB-DEFAULT\u0022)\nset(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)\nset(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)\nset(CPACK_DEBIAN_PACKAGE_SOURCE ON)\nset(CPACK_DEBIAN_COMPONENT_INSTALL ON)\n\n\nset(LWS_LIBRARY_VERSION ${CPACK_PACKAGE_VERSION})\nset(LWS_LIBRARY_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR})\nset(LWS_LIBRARY_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR})\nset(LWS_LIBRARY_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH_NUMBER})\nset(LWS_LIBRARY_VERSION_PATCH_ELABORATED ${CPACK_PACKAGE_VERSION_PATCH})\n\nif (NOT CMAKE_MODULE_PATH)\n\tset(CMAKE_MODULE_PATH \u0022\u0022)\nendif()\nset(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \u0022${PROJECT_SOURCE_DIR}/cmake/\u0022)\n\n\nif (CMAKE_TOOLCHAIN_FILE)\n\tmessage(STATUS \u0022CMAKE_TOOLCHAIN_FILE\u003d'${CMAKE_TOOLCHAIN_FILE}'\u0022)\nendif()\n\nif (NOT LIB_SUFFIX)\n\tset(LIB_SUFFIX \u0022\u0022)\nendif()\n\nif (WIN32)\n\tconfigure_file(${CMAKE_CURRENT_SOURCE_DIR}/win32port/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/win32port/version.rc @ONLY)\n\tset(RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/win32port/version.rc)\nendif()\n\ninclude_directories(include)\n\n# Allow the user to override installation directories.\nset(LWS_INSTALL_LIB_DIR lib CACHE PATH \u0022Installation directory for libraries\u0022)\nset(LWS_INSTALL_BIN_DIR bin CACHE PATH \u0022Installation directory for executables\u0022)\nset(LWS_INSTALL_INCLUDE_DIR include CACHE PATH \u0022Installation directory for header files\u0022)\nset(LWS_INSTALL_EXAMPLES_DIR bin CACHE PATH \u0022Installation directory for example files\u0022)\n\n# if you gave LWS_WITH_MINIZ, point to MINIZ here if not found\n# automatically\n\nset(LWS_ZLIB_LIBRARIES CACHE PATH \u0022Path to the zlib/miniz library\u0022)\nset(LWS_ZLIB_INCLUDE_DIRS CACHE PATH \u0022Path to the zlib/miniz include directory\u0022)\nset(LWS_SQLITE3_LIBRARIES CACHE PATH \u0022Path to the sqlite3 library\u0022)\nset(LWS_SQLITE3_INCLUDE_DIRS CACHE PATH \u0022Path to the sqlite3 include directory\u0022)\nset(LWS_LIBMOUNT_INCLUDE_DIRS CACHE PATH \u0022Path to the libmount include directory\u0022)\nset(LWS_LIBMOUNT_LIBRARIES CACHE PATH \u0022Path to the libmount library\u0022)\n# on unix, these are in the toolchain. On win32 you have to put them somewhere\n# yourself and point to them here\nset(LWS_EXT_PTHREAD_INCLUDE_DIR CACHE PATH \u0022Path to an external pthreads include directory\u0022)\nset(LWS_EXT_PTHREAD_LIBRARIES CACHE PATH \u0022Path to an external pthreads library\u0022)\n\n\nif (LWS_WITH_HTTP_STREAM_COMPRESSION)\n\tset(LWS_WITH_ZLIB 1)\nendif()\n\nif (LWS_WITH_ZLIB AND NOT LWS_WITH_BUNDLED_ZLIB)\n\tif (\u0022${LWS_ZLIB_LIBRARIES}\u0022 STREQUAL \u0022\u0022 OR \u0022${LWS_ZLIB_INCLUDE_DIRS}\u0022 STREQUAL \u0022\u0022)\n\telse()\n\t\tset(ZLIB_LIBRARIES ${LWS_ZLIB_LIBRARIES})\n\t\tset(ZLIB_INCLUDE_DIRS ${LWS_ZLIB_INCLUDE_DIRS})\n\t\tset(ZLIB_FOUND 1)\n\tendif()\nendif()\n\n\nif (LWS_WITH_SQLITE3)\n\tif (\u0022${LWS_SQLITE3_LIBRARIES}\u0022 STREQUAL \u0022\u0022 OR \u0022${LWS_SQLITE3_INCLUDE_DIRS}\u0022 STREQUAL \u0022\u0022)\n\telse()\n\t\tset(SQLITE3_LIBRARIES ${LWS_SQLITE3_LIBRARIES})\n\t\tset(SQLITE3_INCLUDE_DIRS ${LWS_SQLITE3_INCLUDE_DIRS})\n\t\tset(SQLITE3_FOUND 1)\n\tendif()\nendif()\n\ninclude_directories(\u0022${PROJECT_BINARY_DIR}\u0022)\n\n# Check for different inline keyword versions.\nforeach(KEYWORD \u0022inline\u0022 \u0022__inline__\u0022 \u0022__inline\u0022)\n\tset(CMAKE_REQUIRED_DEFINITIONS \u0022-DKEYWORD\u003d${KEYWORD}\u0022)\n\tCHECK_C_SOURCE_COMPILES(\n\t\t\u0022\n\t\t#include \u003cstdio.h\u003e\n\t\tstatic KEYWORD void a() {}\n\t\tint main(int argc, char **argv) { a(); return 0; }\n\t\t\u0022 LWS_HAVE_${KEYWORD})\nendforeach()\n\nif (NOT LWS_HAVE_inline)\n\tif (LWS_HAVE___inline__)\n\t\tset(inline __inline__)\n\telseif(LWS_HAVE___inline)\n\t\tset(inline __inline)\n\tendif()\nendif()\n\n# Put the libraries and binaries that get built into directories at the\n# top of the build tree rather than in hard-to-find leaf directories. \nSET(CMAKE_RUNTIME_OUTPUT_DIRECTORY \u0022${PROJECT_BINARY_DIR}/bin\u0022)\nSET(CMAKE_LIBRARY_OUTPUT_DIRECTORY \u0022${PROJECT_BINARY_DIR}/lib\u0022)\nSET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY \u0022${PROJECT_BINARY_DIR}/lib\u0022)\n\nSET(LWS_INSTALL_PATH \u0022${CMAKE_INSTALL_PREFIX}\u0022)\n\n# Put absolute path of dynamic libraries into the object code. Some\n# architectures, notably Mac OS X, need this.\nSET(CMAKE_INSTALL_NAME_DIR \u0022${CMAKE_INSTALL_PREFIX}/${LWS_INSTALL_LIB_DIR}${LIB_SUFFIX}\u0022)\n\nif (LWS_WITHOUT_BUILTIN_SHA1)\n\tset(LWS_SHA1_USE_OPENSSL_NAME 1)\nendif()\n\nCHECK_C_SOURCE_COMPILES(\n\t\u0022#include \u003cmalloc.h\u003e\n\tint main(int argc, char **argv) { return malloc_trim(0); }\n\t\u0022 LWS_HAVE_MALLOC_TRIM)\nCHECK_C_SOURCE_COMPILES(\n\t\u0022#include \u003cmalloc.h\u003e\n\tint main(int argc, char **argv) { return (int)malloc_usable_size((void *)0); }\n\t\u0022 LWS_HAVE_MALLOC_USABLE_SIZE)\n\nif (PICO_SDK_PATH)\n\tset(CMAKE_REQUIRED_DEFINITIONS \u0022-Dxxexit\u003dexit\u0022)\nendif()\n\nCHECK_FUNCTION_EXISTS(fork LWS_HAVE_FORK)\nCHECK_FUNCTION_EXISTS(getenv LWS_HAVE_GETENV)\nCHECK_FUNCTION_EXISTS(malloc LWS_HAVE_MALLOC)\nCHECK_FUNCTION_EXISTS(memset LWS_HAVE_MEMSET)\nCHECK_FUNCTION_EXISTS(realloc LWS_HAVE_REALLOC)\nCHECK_FUNCTION_EXISTS(socket LWS_HAVE_SOCKET)\nCHECK_FUNCTION_EXISTS(strerror LWS_HAVE_STRERROR)\nCHECK_FUNCTION_EXISTS(vfork LWS_HAVE_VFORK)\nCHECK_FUNCTION_EXISTS(execvpe LWS_HAVE_EXECVPE)\nCHECK_FUNCTION_EXISTS(getifaddrs LWS_HAVE_GETIFADDRS)\nCHECK_FUNCTION_EXISTS(snprintf LWS_HAVE_SNPRINTF)\nCHECK_FUNCTION_EXISTS(_snprintf LWS_HAVE__SNPRINTF)\nCHECK_FUNCTION_EXISTS(_vsnprintf LWS_HAVE__VSNPRINTF)\nCHECK_FUNCTION_EXISTS(getloadavg LWS_HAVE_GETLOADAVG)\nCHECK_FUNCTION_EXISTS(atoll LWS_HAVE_ATOLL)\nCHECK_FUNCTION_EXISTS(_atoi64 LWS_HAVE__ATOI64)\nCHECK_FUNCTION_EXISTS(_stat32i64 LWS_HAVE__STAT32I64)\nCHECK_FUNCTION_EXISTS(clock_gettime LWS_HAVE_CLOCK_GETTIME)\nCHECK_FUNCTION_EXISTS(localtime_r LWS_HAVE_LOCALTIME_R)\nCHECK_FUNCTION_EXISTS(gmtime_r LWS_HAVE_GMTIME_R)\nCHECK_FUNCTION_EXISTS(ctime_r LWS_HAVE_CTIME_R)\nCHECK_FUNCTION_EXISTS(getgrgid_r LWS_HAVE_GETGRGID_R)\nCHECK_FUNCTION_EXISTS(getgrnam_r LWS_HAVE_GETGRNAM_R)\nCHECK_FUNCTION_EXISTS(getpwuid_r LWS_HAVE_GETPWUID_R)\nCHECK_FUNCTION_EXISTS(getpwnam_r LWS_HAVE_GETPWNAM_R)\nCHECK_FUNCTION_EXISTS(timegm LWS_HAVE_TIMEGM)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cmalloc.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_IN6ADDR_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cmemory.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_MEMORY_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cnetinet/in.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_NETINET_IN_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstdint.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_STDINT_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstdlib.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_STDLIB_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstrings.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_STRINGS_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstring.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_STRING_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/prctl.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_PRCTL_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/socket.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_SOCKET_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/sockio.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_SOCKIO_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/stat.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_STAT_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/types.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_TYPES_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cunistd.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_UNISTD_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cvfork.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_VFORK_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/capability.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_CAPABILITY_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cmalloc.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_MALLOC_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cpthread.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_PTHREAD_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cinttypes.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_INTTYPES_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/resource.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYS_RESOURCE_H)\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003clinux/ipv6.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_LINUX_IPV6_H)\nif (LWS_HAVE_SYS_TYPES_H)\n\tCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/types.h\u003e\u005cn#include \u003cnet/ethernet.h\u003e\u005cn void main(void) { while (1) ; } void xxexit(void){}\u0022 LWS_HAVE_NET_ETHERNET_H)\nelse()\n\tCHECK_C_SOURCE_COMPILES(\u0022#include \u003cnet/ethernet.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_NET_ETHERNET_H)\nendif()\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csystemd/sd-daemon.h\u003e\u005cnvoid main(void) { while(1) ; } void xxexit(void){}\u0022 LWS_HAVE_SYSTEMD_H)\n\n\n\nif (LWS_EXT_PTHREAD_INCLUDE_DIR)\n\tset(LWS_HAVE_PTHREAD_H 1)\nendif()\n\nif(CMAKE_SYSTEM_NAME MATCHES \u0022Darwin\u0022)\n\tif(CMAKE_OSX_DEPLOYMENT_TARGET LESS \u002210.12\u0022)\n\t\tmessage(\u0022No clock_gettime found on macOS ${CMAKE_OSX_DEPLOYMENT_TARGET}. Disabling LWS_HAVE_CLOCK_GETTIME.\u0022)\n\t\tset(LWS_HAVE_CLOCK_GETTIME 0)\n\tendif()\nendif()\n\nif (NOT LWS_HAVE_GETIFADDRS)\n\tif (LWS_WITHOUT_BUILTIN_GETIFADDRS)\n\t\tmessage(FATAL_ERROR \u0022No getifaddrs was found on the system. Turn off the LWS_WITHOUT_BUILTIN_GETIFADDRS compile option to use the supplied BSD version.\u0022)\n\tendif()\n\tset(LWS_BUILTIN_GETIFADDRS 1)\nendif()\n\nif (LWS_EXT_PTHREAD_INCLUDE_DIR)\n\tset(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES};${LWS_EXT_PTHREAD_INCLUDE_DIR})\n\tinclude_directories(${LWS_EXT_PTHREAD_INCLUDE_DIR})\n\n\tlist(APPEND LIB_LIST_AT_END ${LWS_EXT_PTHREAD_LIBRARIES})\n\tset(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} \u0022 -DHAVE_STRUCT_TIMESPEC\u003d1\u0022)\nendif()\n\n#\n# add libs here that need to be at the end of the link order\n#\n\nif (LWS_EXT_PTHREAD_INCLUDE_DIR)\n\tlist(APPEND LIB_LIST_AT_END ${LWS_EXT_PTHREAD_LIBRARIES})\nendif()\n\nif (LWS_WITH_ZLIB AND NOT LWS_WITH_BUNDLED_ZLIB)\n\tlist(APPEND LIB_LIST_AT_END \u0022${ZLIB_LIBRARIES}\u0022)\nendif()\n\nif (LWS_WITH_PLUGINS_API AND UNIX AND CMAKE_DL_LIBS AND NOT (${CMAKE_SYSTEM_NAME} MATCHES \u0022QNX\u0022))\n\tlist(APPEND LIB_LIST_AT_END ${CMAKE_DL_LIBS})\nendif()\n\n\nif (WIN32 OR MSVC)\n\tCHECK_C_SOURCE_COMPILES(\u0022#include \u003cwinsock2.h\u003e\n\t\t\t\t #include \u003cafunix.h\u003e\n\t\t\t\t int main() { return 0; }\u0022 LWS_HAVE_WIN32_AFUNIX_H)\n\n\tif (LWS_UNIX_SOCK AND NOT LWS_HAVE_WIN32_AFUNIX_H)\n\t\tmessage(\u0022No afunix.h found. Disabling LWS_UNIX_SOCK.\u0022)\n\t\tset(LWS_WITH_UNIX_SOCK OFF)\n\tendif()\nendif()\n\nif (LWS_WITH_LIBCAP)\n CHECK_LIBRARY_EXISTS(cap cap_set_flag \u0022\u0022 LWS_HAVE_LIBCAP)\nelse()\n set(LWS_HAVE_LIBCAP OFF)\nendif()\n\n\nif (LWS_WITH_ZLIB AND NOT LWS_WITH_BUNDLED_ZLIB)\n\tif (LWS_WITH_MINIZ)\n\t\tCHECK_INCLUDE_FILE(miniz.h LWS_HAVE_ZLIB_H)\n\telse()\n\t\tCHECK_INCLUDE_FILE(zlib.h LWS_HAVE_ZLIB_H)\n\tendif()\nendif()\n\nCHECK_INCLUDE_FILES(\u0022stdlib.h;stdarg.h;string.h\u0022 STDC_HEADERS)\n\nif (NOT CMAKE_REQUIRED_FLAGS)\n\tset(CMAKE_REQUIRED_FLAGS \u0022\u0022)\nendif()\nif (NOT CMAKE_REQUIRED_INCLUDES)\n\tset(CMAKE_REQUIRED_INCLUDES \u0022\u0022)\nendif()\nif (NOT CMAKE_REQUIRED_LIBRARIES)\n\tset(CMAKE_REQUIRED_LIBRARIES \u0022\u0022)\nendif()\n\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstdint.h\u003e \n\tint main(void) {\n\t\tintptr_t test \u003d 1;\n\t\treturn 0;\n\t}\u0022 LWS_HAS_INTPTR_T)\n\nif ((CMAKE_C_COMPILER_ID MATCHES \u0022Clang\u0022) OR\n (CMAKE_CXX_COMPILER_ID MATCHES \u0022Clang\u0022))\n\tset(COMPILER_IS_CLANG ON)\nendif()\n\nif (LWS_HAVE_PTHREAD_H AND NOT LWS_PLAT_FREERTOS)\n\tCHECK_C_SOURCE_COMPILES(\u0022\n\t\t#ifndef _GNU_SOURCE\n\t\t#define _GNU_SOURCE\n\t\t#endif\n\t\t#include \u003cpthread.h\u003e\n\t\tint main(void) {\n\t\t#ifdef __PTW32_H\n\t\t\tpthread_t th \u003d {0,0};\n\t\t#else\n\t\t\tpthread_t th \u003d 0;\n\t\t#endif\n\t\t\tpthread_setname_np(th, NULL);\n\t\t\treturn 0;\n\t\t}\u0022 LWS_HAS_PTHREAD_SETNAME_NP)\nendif()\n\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003cstddef.h\u003e\n\t#include \u003cgetopt.h\u003e\n\tint main(void) {\n\t\tvoid *p \u003d (void *)getopt_long;\n\t\treturn p !\u003d NULL;\n\t}\u0022 LWS_HAS_GETOPT_LONG)\n\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003clinux/rtnetlink.h\u003e\n\tint main(void) {\n\t\tint test \u003d RTA_PREF;\n\t\treturn 0;\n\t}\u0022 LWS_HAVE_RTA_PREF)\n\nCHECK_C_SOURCE_COMPILES(\u0022#include \u003csys/types.h\u003e\n\tint main(void) {\n\t\tsuseconds_t x \u003d 0;\n\t\treturn (int)x;\n\t}\u0022 LWS_HAVE_SUSECONDS_T)\n\nif (NOT PID_T_SIZE)\n\tset(pid_t int)\nendif()\n\nif (NOT SIZE_T_SIZE)\n\tset(size_t \u0022unsigned int\u0022)\nendif()\n\nif (NOT LWS_HAVE_MALLOC)\n\tset(malloc rpl_malloc)\nendif()\n\nif (NOT LWS_HAVE_REALLOC)\n\tset(realloc rpl_realloc)\nendif()\n\n\n\n\nif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)\n include (CheckCCompilerFlag)\n CHECK_C_COMPILER_FLAG(-fvisibility\u003dhidden LWS_HAVE_VISIBILITY)\n if (LWS_WITH_FANALYZER)\n\t CHECK_C_COMPILER_FLAG(-fanalyzer LWS_HAVE_FANALYZER)\n endif()\n if (LWS_HAVE_VISIBILITY)\n set(VISIBILITY_FLAG -fvisibility\u003dhidden)\n endif()\n if (LWS_WITH_GCOV)\n\t set (GCOV_FLAGS \u0022-fprofile-arcs -ftest-coverage \u0022)\n else()\n\t set(GCOV_FLAGS \u0022\u0022)\n endif()\n\n\tif (LWS_WITH_ASAN)\n\t\tset (ASAN_FLAGS \u0022-fsanitize\u003daddress -fsanitize\u003dundefined -fsanitize-address-use-after-scope -fsanitize-undefined-trap-on-error\u0022)\n\t\tif (NOT COMPILER_IS_CLANG)\n\t\t\tset (ASAN_FLAGS \u0022${ASAN_FLAGS} -fsanitize\u003dpointer-compare -fsanitize\u003dpointer-subtract -fsanitize\u003dleak\u0022)\n\t\tendif()\n\t\tmessage(\u0022Enabling ASAN\u0022)\n\telse()\n\t\tset(ASAN_FLAGS \u0022\u0022)\n\tendif()\n\n\tcheck_c_compiler_flag(\u0022-Wignored-qualifiers\u0022 LWS_GCC_HAS_IGNORED_QUALIFIERS)\n\tcheck_c_compiler_flag(\u0022-Wtype-limits\u0022 LWS_GCC_HAS_TYPE_LIMITS)\n\tcheck_c_compiler_flag(\u0022-Wno-deprecated-declarations\u0022 LWS_GCC_HAS_NO_DEPRECATED_DECLARATIONS)\n\n\tif (LWS_GCC_HAS_IGNORED_QUALIFIERS)\n\t\tset(CMAKE_C_FLAGS \u0022-Wignored-qualifiers ${CMAKE_C_FLAGS}\u0022 )\n\tendif()\n\n\tif (LWS_GCC_HAS_TYPE_LIMITS)\n\t\tset(CMAKE_C_FLAGS \u0022-Wtype-limits ${CMAKE_C_FLAGS}\u0022 )\n\tendif()\n\n\tif (LWS_WITH_FANALYZER AND LWS_HAVE_FANALYZER)\n\t\tset(CMAKE_C_FLAGS \u0022-fanalyzer ${CMAKE_C_FLAGS}\u0022 )\n\tendif()\n\n\tif (CMAKE_COMPILER_IS_CLANG OR CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4)\n\t\tset(CMAKE_C_FLAGS \u0022-Wuninitialized ${CMAKE_C_FLAGS}\u0022)\n\tendif()\n\n\t# always warn all and generate debug info\n\tif (UNIX AND NOT LWS_PLAT_FREERTOS)\n\t\tset(CMAKE_C_FLAGS \u0022-Wall -Wextra -Wno-unused-parameter -Wconversion -Wsign-compare -Wstrict-aliasing ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS} ${ASAN_FLAGS}\u0022 )\n\telse()\n\t\tset(CMAKE_C_FLAGS \u0022-Wall -Wsign-compare ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}\u0022 )\n\tendif()\n\n\tif (PICO_SDK_PATH)\n\t\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wconversion -Wsign-compare -Wstrict-aliasing -Wundef -nolibc\u0022)\n\tendif()\n\n\tif (ESP_PLATFORM AND (CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3))\n\t\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -mlongcalls\u0022)\n\tendif()\n\n\tif (\u0022${DISABLE_WERROR}\u0022 STREQUAL \u0022OFF\u0022)\n\t\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -Werror\u0022)\n\tendif()\n\n\tif (LWS_SUPPRESS_DEPRECATED_API_WARNINGS)\n\t\tset(CMAKE_C_FLAGS \u0022-Wno-deprecated ${CMAKE_C_FLAGS}\u0022)\n\t\tif (LWS_GCC_HAS_NO_DEPRECATED_DECLARATIONS)\n\t\t\tset(CMAKE_C_FLAGS \u0022-Wno-deprecated-declarations ${CMAKE_C_FLAGS}\u0022)\n\t\tendif()\n\tendif()\nendif ()\n\nif ((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT LWS_WITHOUT_TESTAPPS)\n\tif (UNIX AND LWS_HAVE_PTHREAD_H AND NOT (${CMAKE_SYSTEM_NAME} MATCHES \u0022QNX\u0022))\n\t# jeez clang understands -pthread but dies if he sees it at link time!\n\t# http://stackoverflow.com/questions/2391194/what-is-gs-pthread-equiv-in-clang\n\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -pthread\u0022 )\n\tlist(APPEND LIB_LIST_AT_END -lpthread)\n endif()\nendif()\n\nif (COMPILER_IS_CLANG)\n\n\t# otherwise osx blows a bunch of openssl deprecated api errors\n\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -Wno-deprecated-declarations\u0022 )\n\tif (UNIX AND LWS_HAVE_PTHREAD_H)\n\t\tset(CMAKE_C_FLAGS \u0022${CMAKE_C_FLAGS} -pthread -Wno-error\u003dunused-command-line-argument\u0022 )\n\tendif()\nendif()\n\nif (WINCE)\n\tlist(APPEND LIB_LIST_AT_END ws2.lib)\nelseif (WIN32)\n\tlist(APPEND LIB_LIST_AT_END ws2_32.lib userenv.lib psapi.lib iphlpapi.lib crypt32.lib)\nendif()\n\nif (MSVC)\n\t# Turn off pointless microsoft security warnings.\n\tadd_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)\n\t# Fail the build if any warnings\n\tadd_compile_options(/W3 /WX)\n\t# Unbreak MSVC broken preprocessor __VA_ARGS__ behaviour\n\tif (MSVC_VERSION GREATER 1925)\n\t\tadd_compile_options(/Zc:preprocessor /wd5105)\n\telse()\n\t\tadd_compile_options(/experimental:preprocessor /wd5105)\n\tendif()\nendif(MSVC)\n\nif (MINGW)\n\tset(LWS_MINGW_SUPPORT 1)\n\tset(CMAKE_C_FLAGS \u0022-D__USE_MINGW_ANSI_STDIO ${CMAKE_C_FLAGS}\u0022)\n\tadd_definitions(-DWINVER\u003d0x0601 -D_WIN32_WINNT\u003d0x0601)\nendif()\n\nif (HDR_PRIVATE)\n\tsource_group(\u0022Headers Private\u0022 FILES ${HDR_PRIVATE})\nendif()\nif (HDR_PUBLIC)\n\tsource_group(\u0022Headers Public\u0022 FILES ${HDR_PUBLIC})\nendif()\nif (SOURCES)\n\tsource_group(\u0022Sources\u0022 FILES ${SOURCES})\nendif()\nif (RESOURCES)\n\tsource_group(\u0022Resources\u0022 FILES ${RESOURCES})\nendif()\n\n\n#\n# ZLIB (needed for deflate extension and if LWS_WITH_HTTP_STREAM_COMPRESSION)\n#\nif (LWS_WITH_ZLIB)\n\tif (NOT ZLIB_FOUND)\n\t\tif (LWS_WITH_MINIZ)\n\t\t\tfind_package(Miniz REQUIRED)\n\t\t\tset(ZLIB_INCLUDE_DIRS ${MINIZ_INCLUDE_DIR})\n\t\t\tset(ZLIB_LIBRARIES ${MINIZ_LIBRARIES})\n\t\telse()\n\t\t\tfind_package(ZLIB REQUIRED)\n\t\tendif()\n\tendif()\n\tmessage(\u0022zlib/miniz include dirs: ${ZLIB_INCLUDE_DIRS}\u0022)\n\tmessage(\u0022zlib/miniz libraries: ${ZLIB_LIBRARIES}\u0022)\n\tinclude_directories(${ZLIB_INCLUDE_DIRS})\n\t# done later at end of link list\n\t# list(APPEND LIB_LIST ${ZLIB_LIBRARIES})\n\tset(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ZLIB_LIBRARIES})\n\tlist(APPEND LIB_LIST_AT_END ${ZLIB_LIBRARIES})\nendif()\n\n\nif (LWS_WITH_FSMOUNT AND ${CMAKE_SYSTEM_NAME} STREQUAL \u0022Linux\u0022)\n\tif (NOT LWS_LIBMOUNT_INCLUDE_DIRS STREQUAL \u0022\u0022)\n\t\tinclude_directories(${LWS_LIBMOUNT_INCLUDE_DIRS})\n\t\tmessage(\u0022libmount include dir: ${LWS_LIBMOUNT_INCLUDE_DIRS}\u0022)\n\tendif()\n\tif (NOT LWS_LIBMOUNT_LIBRARIES STREQUAL \u0022\u0022)\n\t\tmessage(\u0022libmount libraries: ${LWS_LIBMOUNT_LIBRARIES}\u0022)\n\t\tlist(APPEND LIB_LIST ${LWS_LIBMOUNT_LIBRARIES})\n\telse()\n\t\tlist(APPEND LIB_LIST mount)\n\tendif()\nendif()\n\n\nif (LWS_WITH_SQLITE3)\n\tif (NOT SQLITE3_FOUND)\n\t\tfind_path(SQLITE3_INCLUDE_DIRS NAMES sqlite3.h)\n\t\tfind_library(SQLITE3_LIBRARIES NAMES sqlite3)\n\t\tif(SQLITE3_INCLUDE_DIRS AND SQLITE3_LIBRARIES)\n\t\t\tset(SQLITE3_FOUND 1)\n\t\tendif()\n\tendif()\n\tmessage(\u0022sqlite3 include dir: ${SQLITE3_INCLUDE_DIRS}\u0022)\n\tmessage(\u0022sqlite3 libraries: ${SQLITE3_LIBRARIES}\u0022)\n\tinclude_directories(\u0022${SQLITE3_INCLUDE_DIRS}\u0022)\n\tlist(APPEND LIB_LIST ${SQLITE3_LIBRARIES})\nendif()\n\n\nif (LWS_WITH_HUBBUB)\n\tfind_library(LIBHUBBUB_LIBRARIES NAMES hubbub)\n\tlist(APPEND LIB_LIST ${LIBHUBBUB_LIBRARIES} )\nendif()\n\nif (LWS_HAVE_LIBCAP)\n\tfind_library(LIBCAP_LIBRARIES NAMES cap)\n\tlist(APPEND LIB_LIST_AT_END ${LIBCAP_LIBRARIES} )\nendif()\n\nif (LWS_WITH_PLUGINS_BUILTIN)\n\tadd_subdirectory(plugins)\nendif()\n\n\n#\n# Append the \u0022at end\u0022 pieces to the lib list\n#\nlist(APPEND LIB_LIST ${LIB_LIST_AT_END})\n\n#\n# Second-level CMakeLists\n#\n\ninclude_directories(\u0022${PROJECT_SOURCE_DIR}/lib\u0022)\nadd_subdirectory(lib)\n\n\nif(WIN32 AND NOT CYGWIN)\n set(DEF_INSTALL_CMAKE_DIR cmake)\nelse()\n set(DEF_INSTALL_CMAKE_DIR lib${LIB_SUFFIX}/cmake/libwebsockets)\nendif()\n \nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/LwsCheckRequirements.cmake\n\t\t${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LwsCheckRequirements.cmake\n\t\t@ONLY)\n\t\t\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/LwsCheckRequirements.cmake\n\t\t${PROJECT_BINARY_DIR}/LwsCheckRequirements.cmake\n\t\t@ONLY) \n\n# Generate version info for both build-tree and install-tree.\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config-version.cmake.in\n ${PROJECT_BINARY_DIR}/libwebsockets-config-version.cmake \n @ONLY)\n\n# Generate the config file for the build-tree.\nset(LWS__INCLUDE_DIRS \n \u0022${PROJECT_SOURCE_DIR}/lib\u0022\n \u0022${PROJECT_BINARY_DIR}\u0022)\nset(LIBWEBSOCKETS_INCLUDE_DIRS ${LWS__INCLUDE_DIRS} CACHE PATH \u0022Libwebsockets include directories\u0022)\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in\n ${PROJECT_BINARY_DIR}/libwebsockets-config.cmake \n @ONLY)\nset(LWS_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH \u0022Installation directory for CMake files\u0022)\n\n# Export targets (This is used for other CMake projects to easily find the libraries and include files).\nif (LWS_WITH_EXPORT_LWSTARGETS)\n export(TARGETS ${LWS_LIBRARIES}\n FILE \u0022${PROJECT_BINARY_DIR}/LibwebsocketsTargets.cmake\u0022)\nendif()\n\n\n\nset(libwebsockets_DIR ${PROJECT_BINARY_DIR})\nset(CMAKE_MODULE_PATH \u0022${PROJECT_SOURCE_DIR}/cmake\u0022)\nmessage(\u0022DIR ${libwebsockets_DIR} CMP ${CMAKE_MODULE_PATH}\u0022)\n\nif (LWS_WITH_MINIMAL_EXAMPLES)\n\tif (LWS_WITH_SECURE_STREAMS)\n\t\tadd_subdirectory(minimal-examples)\n\tendif()\n\tadd_subdirectory(minimal-examples-lowlevel)\nendif()\n\nif (NOT LWS_WITHOUT_TESTAPPS)\n\tadd_subdirectory(test-apps)\nendif()\n\nif (NOT LWS_WITH_PLUGINS_BUILTIN)\nadd_subdirectory(plugins)\nendif()\nadd_subdirectory(lwsws)\nif (PICO_SDK_PATH)\n\tlink_libraries(pico_stdlib PRIVATE)\nendif()\n\nif (LWS_WITH_MCUFONT_ENCODER)\n\tadd_subdirectory(contrib/mcufont/encoder)\nendif()\n\n# Generate the lws_config.h that includes all the public compilation settings.\nconfigure_file(\n \u0022${PROJECT_SOURCE_DIR}/cmake/lws_config.h.in\u0022\n \u0022${PROJECT_BINARY_DIR}/lws_config.h\u0022)\n \nadd_custom_command(\n\t\tOUTPUT ${PROJECT_BINARY_DIR}/include/lws_config.h\n\t\t\t${PROJECT_BINARY_DIR}/include/libwebsockets\n\t\t\t${PROJECT_BINARY_DIR}/include/libwebsockets.h\n\t\tCOMMENT \u0022Creating build include dir\u0022\n\t\tCOMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets.h\n \t\t\t${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets.h\n\t\tCOMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets/\n\t\t\t${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets\n\t\tCOMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/lws_config.h\n \t\t\t${CMAKE_CURRENT_BINARY_DIR}/include/lws_config.h\n\t\tMAIN_DEPENDENCY ${PROJECT_BINARY_DIR}/lws_config.h\n)\n\nadd_custom_target(GENHDR DEPENDS ${PROJECT_BINARY_DIR}/include/lws_config.h)\nif (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)\n set_property(TARGET GENHDR APPEND PROPERTY ADDITIONAL_CLEAN_FILES\n\t \u0022${PROJECT_BINARY_DIR}/include/libwebsockets\u0022)\nendif()\n\n\nfile(GLOB HDR_PUBLIC1 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/libwebsockets/*.h)\nfile(GLOB HDR_PUBLIC2 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/libwebsockets.h)\nfile(GLOB HDR_PUBLIC3 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include/lws_config.h)\nlist(APPEND HDR_PUBLIC ${HDR_PUBLIC1} ${HDR_PUBLIC2} ${HDR_PUBLIC3})\n\nset_source_files_properties(${HDR_PUBLIC} PROPERTIES GENERATED 1)\n\nif (LWS_WITH_STATIC)\n\tadd_dependencies(websockets GENHDR)\nendif()\nif (LWS_WITH_SHARED)\n\tadd_dependencies(websockets_shared GENHDR)\nendif()\n\nif (LWS_ONLY_SSPC)\n\t\ttarget_compile_definitions(websockets PUBLIC STANDALONE)\nendif()\n\n\n#\n#\n# Installation preparations.\n#\n\nexport(PACKAGE libwebsockets)\n\ninstall(DIRECTORY include/libwebsockets\n\tDESTINATION \u0022${LWS_INSTALL_INCLUDE_DIR}\u0022 COMPONENT dev)\ninstall(FILES ${PROJECT_BINARY_DIR}/include/libwebsockets.h ${PROJECT_BINARY_DIR}/include/lws_config.h\n\tDESTINATION \u0022${LWS_INSTALL_INCLUDE_DIR}\u0022 COMPONENT dev)\n\n# Generate the config file for the installation tree.\nget_filename_component(LWS_ABSOLUTE_INSTALL_CMAKE_DIR ${LWS_INSTALL_CMAKE_DIR} ABSOLUTE)\nget_filename_component(LWS_ABSOLUTE_INSTALL_INCLUDE_DIR ${LWS_INSTALL_INCLUDE_DIR} ABSOLUTE)\nfile(RELATIVE_PATH \n REL_INCLUDE_DIR \n \u0022${LWS_ABSOLUTE_INSTALL_CMAKE_DIR}\u0022\n \u0022${LWS_ABSOLUTE_INSTALL_INCLUDE_DIR}\u0022) # Calculate the relative directory from the cmake dir.\n\nif (DEFINED REL_INCLUDE_DIR)\n set(LWS__INCLUDE_DIRS \u0022\u005c${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}\u0022)\nendif()\nif (DEFINED OPENSSL_INCLUDE_DIRS)\n\tset(LWS__INCLUDE_DIRS \u0022${LWS__INCLUDE_DIRS};${OPENSSL_INCLUDE_DIRS}\u0022)\nendif()\n\nconfigure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in\n ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/libwebsockets-config.cmake\n @ONLY)\n\nset_target_properties(${LWS_LIBRARIES}\n\t\tPROPERTIES PUBLIC_HEADER \u0022${HDR_PUBLIC}\u0022)\n\n# Install the LibwebsocketsConfig.cmake and LibwebsocketsConfigVersion.cmake\ninstall(FILES\n \u0022${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/libwebsockets-config.cmake\u0022\n \u0022${PROJECT_BINARY_DIR}/libwebsockets-config-version.cmake\u0022\n \u0022${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LwsCheckRequirements.cmake\u0022\n DESTINATION \u0022${LWS_INSTALL_CMAKE_DIR}\u0022 COMPONENT dev)\n\n# Install exports for the install-tree.\nif (LWS_WITH_EXPORT_LWSTARGETS)\n install(EXPORT LibwebsocketsTargets\n DESTINATION \u0022${LWS_INSTALL_CMAKE_DIR}\u0022 COMPONENT dev)\nendif()\n\n# build subdir is not part of sources\nset(CPACK_SOURCE_IGNORE_FILES $(CPACK_SOURCE_IGNORE_FILES) \u0022/.git/\u0022 \u0022/build/\u0022 \u0022\u005c\u005c\u005c\u005c.tgz$\u0022 \u0022\u005c\u005c\u005c\u005c.tar\u005c\u005c\u005c\u005c.gz$\u0022)\n\n# Most people are more used to \u0022make dist\u0022 compared to \u0022make package_source\u0022\nadd_custom_target(dist COMMAND \u0022${CMAKE_MAKE_PROGRAM}\u0022 package_source)\n\n\n\n# This must always be last!\ninclude(CPack)\n","s":{"c":1733287580,"u": 1266}} ],"g": 4990,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}