blob: 355ede18434776ac002f2c4b8088526a89c60ce0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
cmake_minimum_required(VERSION 3.10)
include(FetchContent)
project(emotespp VERSION 1.0.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
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")
# BetterTTV Emote support
set(BUILD_BETTERTTV OFF BOOL "Enable BetterTTV emotes")
if (BUILD_BETTERTTV)
message("-- Building with BetterTTV clients")
target_compile_definitions(${PROJECT_NAME} PRIVATE BUILD_BETTERTTV=1)
endif()
set(USE_TLS ON CACHE BOOL "Use TLS in websocket connections" FORCE)
# 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)
|