2024-02-06 22:19:03 +08:00
|
|
|
|
|
|
|
option(AX_ENABLE_HTTP "Build HTTP client based on yasio" ON)
|
|
|
|
option(AX_ENABLE_WEBSOCKET "Build Websocket client based on yasio" ON)
|
|
|
|
|
2023-09-01 16:31:14 +08:00
|
|
|
if(EMSCRIPTEN)
|
|
|
|
set(_AX_NETWORK_HEADER
|
2023-09-05 22:17:18 +08:00
|
|
|
network/Downloader-wasm.h
|
2023-09-01 16:31:14 +08:00
|
|
|
network/IDownloaderImpl.h
|
|
|
|
network/Downloader.h
|
|
|
|
network/Uri.h
|
2019-11-23 20:27:39 +08:00
|
|
|
)
|
2019-11-24 15:43:28 +08:00
|
|
|
|
2023-09-01 16:31:14 +08:00
|
|
|
set(_AX_NETWORK_SRC
|
|
|
|
network/Downloader.cpp
|
2023-09-05 22:17:18 +08:00
|
|
|
network/Downloader-wasm.cpp
|
2023-09-01 16:31:14 +08:00
|
|
|
network/Uri.cpp
|
2019-11-24 15:43:28 +08:00
|
|
|
)
|
2024-02-06 22:19:03 +08:00
|
|
|
|
|
|
|
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()
|
|
|
|
|
2023-09-01 16:31:14 +08:00
|
|
|
else()
|
|
|
|
set(_AX_NETWORK_HEADER
|
|
|
|
network/Downloader-curl.h
|
|
|
|
network/IDownloaderImpl.h
|
|
|
|
network/Downloader.h
|
|
|
|
network/Uri.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(_AX_NETWORK_SRC
|
|
|
|
network/Downloader.cpp
|
|
|
|
network/Downloader-curl.cpp
|
|
|
|
network/Uri.cpp
|
|
|
|
)
|
2024-02-06 22:19:03 +08:00
|
|
|
|
|
|
|
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()
|
2023-09-01 16:31:14 +08:00
|
|
|
endif()
|
2024-02-06 22:19:03 +08:00
|
|
|
|
|
|
|
|