-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·61 lines (50 loc) · 1.45 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
58
59
60
61
# minimum CMake version required
cmake_minimum_required(VERSION 3.22)
# Project name, version and description
project(p4dc VERSION 0.1 DESCRIPTION "P4DC bot by Alan Tao")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
add_subdirectory(libs/SQLiteCpp)
add_subdirectory(libs/Re2)
add_library(dpp SHARED IMPORTED)
set_property(TARGET dpp PROPERTY
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/DPP/lib/libdpp.so
)
find_package(LibArchive REQUIRED)
configure_file (env.h.in env.h @ONLY)
file (COPY res/templates DESTINATION .)
# Create an executable
add_executable(${PROJECT_NAME}
src/main.cpp
src/slash_commands/pull_request.cpp
src/slash_commands/integration_help.cpp
src/slash_commands/route_here.cpp
src/slash_commands/set_pr_defaults.cpp
src/modals/pull_request.cpp
src/modals/pull_request_defaults.cpp
src/utils/hydratable.cpp
src/utils/api_utils.cpp
src/utils/db_utils.cpp
src/utils/text_utils.cpp
src/utils/modal_utils.cpp
)
# Linking libraries
target_link_libraries(${PROJECT_NAME}
LibArchive::LibArchive
dpp
SQLiteCpp
re2::re2
sqlite3
pthread
dl
)
# Specify includes
target_include_directories(${PROJECT_NAME} PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/libs/DPP/include"
"${CMAKE_CURRENT_LIST_DIR}/include"
${CMAKE_CURRENT_BINARY_DIR}
)
# Set C++ version
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)