cmake_minimum_required(VERSION 3.5)
project(shortener_bot LANGUAGES C CXX)

add_executable(bot main.cpp telegram_client.cpp commands.cpp util.cpp)
set_property(TARGET bot PROPERTY CXX_STANDARD 20)
set_property(TARGET bot PROPERTY CXX_STANDARD_REQUIRED ON)


add_library(libuv STATIC IMPORTED)
set_target_properties(libuv PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libuv-v1.49.0/.libs/libuv.a)

add_subdirectory(td)
add_subdirectory(curl-8.10.1)

target_include_directories(bot PRIVATE ${CMAKE_SOURCE_DIR}/libuv-v1.49.0/include)
target_include_directories(bot PRIVATE ${CMAKE_SOURCE_DIR}/spdlog-1.14.1/include)
target_include_directories(bot PRIVATE ${CMAKE_SOURCE_DIR}/curl-8.10.1/include)
target_link_libraries(bot PRIVATE libuv Td::TdStatic)
target_link_libraries(bot PRIVATE CURL::libcurl)
