summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt')
-rw-r--r--protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt b/protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt
new file mode 100644
index 0000000000..823ed027d6
--- /dev/null
+++ b/protocols/Telegram/tdlib/td/tdnet/CMakeLists.txt
@@ -0,0 +1,54 @@
+cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+
+if (NOT OPENSSL_FOUND)
+ find_package(OpenSSL REQUIRED)
+ find_package(ZLIB REQUIRED)
+endif()
+
+#SOURCE SETS
+set(TDNET_SOURCE
+ td/net/GetHostByNameActor.cpp
+ td/net/HttpChunkedByteFlow.cpp
+ td/net/HttpConnectionBase.cpp
+ td/net/HttpContentLengthByteFlow.cpp
+ td/net/HttpFile.cpp
+ td/net/HttpInboundConnection.cpp
+ td/net/HttpOutboundConnection.cpp
+ td/net/HttpQuery.cpp
+ td/net/HttpReader.cpp
+ td/net/Socks5.cpp
+ td/net/SslFd.cpp
+ td/net/TcpListener.cpp
+ td/net/Wget.cpp
+
+ td/net/GetHostByNameActor.h
+ td/net/HttpChunkedByteFlow.h
+ td/net/HttpConnectionBase.h
+ td/net/HttpContentLengthByteFlow.h
+ td/net/HttpFile.h
+ td/net/HttpHeaderCreator.h
+ td/net/HttpInboundConnection.h
+ td/net/HttpOutboundConnection.h
+ td/net/HttpQuery.h
+ td/net/HttpReader.h
+ td/net/NetStats.h
+ td/net/Socks5.h
+ td/net/SslFd.h
+ td/net/TcpListener.h
+ td/net/Wget.h
+)
+
+#RULES
+#LIBRARIES
+
+add_library(tdnet STATIC ${TDNET_SOURCE})
+target_include_directories(tdnet PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+target_include_directories(tdnet SYSTEM PUBLIC $<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>)
+target_link_libraries(tdnet PUBLIC tdutils tdactor ${OPENSSL_LIBRARIES} PRIVATE ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES})
+
+install(TARGETS tdnet EXPORT TdTargets
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include
+)