1
0
mirror of https://github.com/danog/ton.git synced 2024-11-26 12:04:48 +01:00
ton/tdnet/CMakeLists.txt
2019-09-07 14:33:36 +04:00

27 lines
702 B
CMake

cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
set(TDNET_SOURCE
td/net/FdListener.cpp
td/net/TcpListener.cpp
td/net/UdpServer.cpp
td/net/FdListener.h
td/net/TcpListener.h
td/net/UdpServer.h
)
add_library(tdnet STATIC ${TDNET_SOURCE})
target_include_directories(tdnet PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(tdnet PUBLIC tdactor)
add_executable(tcp_ping_pong example/tcp_ping_pong.cpp)
target_link_libraries(tcp_ping_pong PRIVATE tdactor tdnet)
add_executable(udp_ping_pong example/udp_ping_pong.cpp)
target_link_libraries(udp_ping_pong PRIVATE tdactor tdnet)
set(NET_TEST_SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/test/net-test.cpp
PARENT_SCOPE
)