-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
61 lines (49 loc) · 1.46 KB
/
Copy pathCMakeLists.txt
File metadata and controls
61 lines (49 loc) · 1.46 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.20)
project(bot LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
find_package(dpp CONFIG QUIET)
if (NOT dpp_FOUND)
message(STATUS "DPP not found, fetching from GitHub...")
FetchContent_Declare(
dpp
GIT_REPOSITORY https://github.com/brainboxdotcc/DPP.git
GIT_TAG v10.1.4
)
FetchContent_MakeAvailable(dpp)
if (NOT TARGET dpp::dpp AND TARGET dpp)
add_library(dpp::dpp ALIAS dpp)
endif()
else()
message(STATUS "Using system-installed DPP")
endif()
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/config.json)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/config.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
else()
message(STATUS "src/config.json not found; skipping config copy")
endif()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/res DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_executable(bot
src/main.cpp
#globals
src/globals/globals.cpp
src/globals/globals.h
# commands
src/commands/commands.h
src/commands/utils.cpp
src/commands/topic_cmd.cpp
src/commands/coding_cmd.cpp
src/commands/close_cmd.cpp
src/commands/ticket_cmd.cpp
src/commands/code_cmd.cpp
src/commands/project_cmd.cpp
src/commands/rule_cmd.cpp
src/commands/beginner.cpp
# utils
src/utils/suggestion/suggestion.cpp
src/utils/suggestion/suggestion.h
src/utils/moderation/moderation.cpp
src/utils/moderation/moderation.h
)
target_link_libraries(bot PRIVATE dpp::dpp)