From 53b6600cbaa059d2220c3755e054a51c13558151 Mon Sep 17 00:00:00 2001 From: moderndevslulw Date: Thu, 3 Apr 2025 01:10:41 +0500 Subject: feat: added dependencies --- CMakeLists.txt | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df9b1de..ec7505f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.10) +include(FetchContent) + project(emotespp VERSION 1.0.0) set(CMAKE_CXX_STANDARD 17) @@ -8,4 +10,29 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) file(GLOB_RECURSE SRC_FILES "src/*.cpp") add_library(${PROJECT_NAME} STATIC ${SRC_FILES}) -target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") \ No newline at end of file +target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") + +# websockets +FetchContent_Declare( + ixwebsocket + GIT_REPOSITORY https://github.com/machinezone/IXWebSocket + GIT_TAG v11.4.5 +) +FetchContent_MakeAvailable(ixwebsocket) + +# json +FetchContent_Declare( + json + URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz +) +FetchContent_MakeAvailable(json) + +# http request maker +FetchContent_Declare( + cpr + GIT_REPOSITORY https://github.com/libcpr/cpr.git + GIT_TAG 1.10.5 +) +FetchContent_MakeAvailable(cpr) + +target_link_libraries(${PROJECT_NAME} PUBLIC ixwebsocket::ixwebsocket nlohmann_json::nlohmann_json cpr::cpr) \ No newline at end of file -- cgit v1.2.3