-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·57 lines (42 loc) · 1.29 KB
/
CMakeLists.txt
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
cmake_minimum_required (VERSION 3.20)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(MySQL)
project("BUDe" VERSION 0.5 DESCRIPTION "A friendly discord bot!")
file(GLOB bude_src CONFIGURE_DEPENDS "src/*.h" "src/*.cpp" "src/*/*.h" "src/*/*.cpp" "src/*/*/*.h" "src/*/*/*.cpp")
# Add source to this project's executable.
add_executable(${PROJECT_NAME}
${bude_src}
src/commands/info_command.cpp # Much love to GLOB <3
)
if(EXISTS "/usr/include/fmt/format.h")
target_precompile_headers(${PROJECT_NAME} INTERFACE "/usr/include/fmt/format.h")
MESSAGE(STATUS "Found FMT.")
else ()
message(FATAL_ERROR "Could not find FMT. Please install libfmt-dev.")
endif ()
string(ASCII 27 Esc)
# ===============================================
# Required stuff for coro:
target_compile_definitions(${PROJECT_NAME} PUBLIC
DPP_CORO
)
target_compile_features(${PROJECT_NAME} PUBLIC
cxx_std_20
)
set(DPP_CORO on)
# Coro stuff over.
# ===============================================
add_subdirectory(libs/DPP)
target_link_libraries(${PROJECT_NAME}
fmt
mysqlclient
dpp
)
target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
libs/DPP/include
)
set_target_properties(${PROJECT_NAME} PROPERTIES
CMAKE_STANDARD 20
CMAKE_STANDARD_REQUIRED ON
)