# -- get header files for creating "proper" XCode projects ---------------------

file(GLOB_RECURSE CAF_NET_HEADERS "caf/*.hpp")

# -- add targets ---------------------------------------------------------------

configure_file(test/pem.cpp.in test/pem.cpp @ONLY)

caf_add_component(
  net
  DEPENDENCIES
  PUBLIC
  $<$<CXX_COMPILER_ID:MSVC>:ws2_32>
  CAF::core
  OpenSSL::Crypto
  OpenSSL::SSL
  PRIVATE
  CAF::internal
  ENUM_TYPES
  net.http.method
  net.http.status
  net.octet_stream.errc
  net.ssl.dtls
  net.ssl.errc
  net.ssl.format
  net.ssl.tls
  net.web_socket.status
  HEADERS
  ${CAF_NET_HEADERS}
  SOURCES
  src/detail/convert_ip_endpoint.cpp
  src/detail/pollset_updater.cpp
  src/detail/rfc6455.cpp
  src/net/abstract_actor_shell.cpp
  src/net/actor_shell.cpp
  src/net/datagram_socket.cpp
  src/net/dsl/config_base.cpp
  src/net/generic_lower_layer.cpp
  src/net/generic_upper_layer.cpp
  src/net/http/config.cpp
  src/net/http/lower_layer.cpp
  src/net/http/method.cpp
  src/net/http/request.cpp
  src/net/http/request_header.cpp
  src/net/http/responder.cpp
  src/net/http/response.cpp
  src/net/http/route.cpp
  src/net/http/router.cpp
  src/net/http/server.cpp
  src/net/http/server_factory.cpp
  src/net/http/status.cpp
  src/net/http/upper_layer.cpp
  src/net/http/v1.cpp
  src/net/ip.cpp
  src/net/lp/default_trait.cpp
  src/net/lp/frame.cpp
  src/net/lp/framing.cpp
  src/net/lp/lower_layer.cpp
  src/net/lp/upper_layer.cpp
  src/net/middleman.cpp
  src/net/multiplexer.cpp
  src/net/network_socket.cpp
  src/net/octet_stream/lower_layer.cpp
  src/net/octet_stream/policy.cpp
  src/net/octet_stream/transport.cpp
  src/net/octet_stream/upper_layer.cpp
  src/net/pipe_socket.cpp
  src/net/prometheus.cpp
  src/net/socket.cpp
  src/net/socket_event_layer.cpp
  src/net/socket_manager.cpp
  src/net/ssl/connection.cpp
  src/net/ssl/context.cpp
  src/net/ssl/dtls.cpp
  src/net/ssl/errc.cpp
  src/net/ssl/format.cpp
  src/net/ssl/password.cpp
  src/net/ssl/startup.cpp
  src/net/ssl/tcp_acceptor.cpp
  src/net/ssl/tls.cpp
  src/net/ssl/transport.cpp
  src/net/ssl/verify.cpp
  src/net/stream_socket.cpp
  src/net/tcp_accept_socket.cpp
  src/net/tcp_stream_socket.cpp
  src/net/this_host.cpp
  src/net/udp_datagram_socket.cpp
  src/net/web_socket/client.cpp
  src/net/web_socket/default_trait.cpp
  src/net/web_socket/frame.cpp
  src/net/web_socket/framing.cpp
  src/net/web_socket/handshake.cpp
  src/net/web_socket/lower_layer.cpp
  src/net/web_socket/server.cpp
  src/net/web_socket/upper_layer.cpp
  TEST_SOURCES
  ${CMAKE_CURRENT_BINARY_DIR}/test/pem.cpp
  test/net-test.cpp
  TEST_SUITES
  detail.convert_ip_endpoint
  detail.rfc6455
  net.accept_socket
  net.actor_shell
  net.datagram_socket
  net.http.router
  net.http.server
  net.ip
  net.length_prefix_framing
  net.lp.frame
  net.multiplexer
  net.network_socket
  net.octet_stream.transport
  net.pipe_socket
  net.socket
  net.socket_guard
  net.ssl.transport
  net.stream_socket
  net.tcp_socket
  net.typed_actor_shell
  net.udp_datagram_socket
  net.web_socket.client
  net.web_socket.frame
  net.web_socket.handshake
  net.web_socket.server)
