-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to disable default implementations of HTTP and WebSocket clie…
…nts (#1656) * Allow HttpClient and Websocket implementations to be excluded from build * Allow LLHTTP to be excluded from build * Add descriptions of new options * Rename options based on current convention of AX_ENABLE_XXX
- Loading branch information
Showing
3 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,82 @@ | ||
|
||
option(AX_ENABLE_HTTP "Build HTTP client based on yasio" ON) | ||
option(AX_ENABLE_WEBSOCKET "Build Websocket client based on yasio" ON) | ||
|
||
if(EMSCRIPTEN) | ||
set(_AX_NETWORK_HEADER | ||
network/Downloader-wasm.h | ||
network/IDownloaderImpl.h | ||
network/Downloader.h | ||
network/Uri.h | ||
network/HttpClient.h | ||
network/HttpResponse.h | ||
network/HttpRequest.h | ||
) | ||
|
||
set(_AX_NETWORK_SRC | ||
network/HttpClient-wasm.cpp | ||
network/Downloader.cpp | ||
network/Downloader-wasm.cpp | ||
network/HttpCookie.cpp | ||
network/Uri.cpp | ||
network/WebSocket-wasm.cpp | ||
) | ||
|
||
if (AX_ENABLE_HTTP) | ||
list(APPEND _AX_NETWORK_HEADER | ||
network/HttpClient.h | ||
network/HttpResponse.h | ||
network/HttpRequest.h | ||
network/HttpCookie.h | ||
) | ||
|
||
list(APPEND _AX_NETWORK_SRC | ||
network/HttpClient-wasm.cpp | ||
network/HttpCookie.cpp | ||
) | ||
endif() | ||
|
||
if (AX_ENABLE_WEBSOCKET) | ||
list(APPEND _AX_NETWORK_HEADER | ||
network/WebSocket.h | ||
) | ||
|
||
list(APPEND _AX_NETWORK_SRC | ||
network/WebSocket-wasm.cpp | ||
) | ||
endif() | ||
|
||
else() | ||
set(_AX_NETWORK_HEADER | ||
network/Downloader-curl.h | ||
network/IDownloaderImpl.h | ||
network/Downloader.h | ||
network/Uri.h | ||
network/HttpClient.h | ||
network/HttpResponse.h | ||
network/HttpRequest.h | ||
network/HttpCookie.h | ||
network/WebSocket.h | ||
) | ||
|
||
set(_AX_NETWORK_SRC | ||
network/HttpClient.cpp | ||
network/Downloader.cpp | ||
network/Downloader-curl.cpp | ||
network/HttpCookie.cpp | ||
network/Uri.cpp | ||
network/WebSocket.cpp | ||
) | ||
|
||
if (AX_ENABLE_HTTP) | ||
list(APPEND _AX_NETWORK_HEADER | ||
network/HttpClient.h | ||
network/HttpResponse.h | ||
network/HttpRequest.h | ||
network/HttpCookie.h | ||
) | ||
|
||
list(APPEND _AX_NETWORK_SRC | ||
network/HttpClient.cpp | ||
network/HttpCookie.cpp | ||
) | ||
endif() | ||
|
||
if (AX_ENABLE_WEBSOCKET) | ||
list(APPEND _AX_NETWORK_HEADER | ||
network/WebSocket.h | ||
) | ||
|
||
list(APPEND _AX_NETWORK_SRC | ||
network/WebSocket.cpp | ||
) | ||
endif() | ||
endif() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters