cmake_minimum_required(VERSION 3.16)

project(Older VERSION 0.1 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Boost REQUIRED COMPONENTS json)
find_package(OpenSSL REQUIRED)

add_subdirectory(3rdparty)
add_subdirectory(Base)
add_subdirectory(UnitTest)

add_executable(Older main.cpp
    WebRTC/SignalServer.h WebRTC/SignalServer.cpp
    WebRTC/WebSocketSignalSession.h WebRTC/WebSocketSignalSession.cpp

    WeChat/Corporation/Context.h WeChat/Corporation/Context.cpp

    Application.h Application.cpp
    Database.h Database.cpp
    HttpSession.h HttpSession.cpp
    ResponseUtility.h ResponseUtility.cpp
    ServiceLogic.h ServiceLogic.inl ServiceLogic.cpp
    SessionStore.h SessionStore.cpp
    Settings.h Settings.cpp
)

target_include_directories(Older
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_libraries(Older
    PRIVATE Base
    PRIVATE Kylin::Core
    PRIVATE Kylin::Http
    PRIVATE Kylin::Router
    PRIVATE Boost::json
    PRIVATE sqlite3
)

include(FetchContent)
FetchContent_Declare(Kylin
GIT_REPOSITORY ssh://git@gitea.amass.fun:2022/amass/Kylin.git
)
# add_subdirectory(/mnt/e/Projects/Kylin Kylin)
FetchContent_MakeAvailable(Kylin)