-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
46 lines (37 loc) · 1.31 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
cmake_minimum_required(VERSION 3.15)
project(Anilab VERSION 1.0.0 DESCRIPTION "The ultimate anime bot for all servers")
aux_source_directory(src mainsrc)
aux_source_directory(src/cmd_common common)
aux_source_directory(src/cmd_moderation moderation)
aux_source_directory(src/cmd_mihoyo mihoyo)
add_executable(
${PROJECT_NAME}
${mainsrc}
${common}
${moderation}
${mihoyo}
"Anilab.rc"
)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/dpp.lib)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/sqlite3.lib)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/python39.lib)
target_include_directories(${PROJECT_NAME} PRIVATE
"cores"
"include"
"include/dpp"
"lib"
)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/bin $<TARGET_FILE_DIR:${PROJECT_NAME}>
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/.env $<TARGET_FILE_DIR:${PROJECT_NAME}>
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/languages $<TARGET_FILE_DIR:${PROJECT_NAME}>/languages
COMMAND ${CMAKE_COMMAND} -E make_directory
$<TARGET_FILE_DIR:${PROJECT_NAME}>/database
)