blob: 268e50d35e6351ab946dea2a2fb9b8c5f098f8c6 (
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
|
cmake_minimum_required(VERSION 3.10)
project(
RedpilledBot
VERSION 1.0
DESCRIPTION "a silly twitch chat bot"
)
function(create_symlink_if_exists source target)
if(EXISTS "${source}")
message(STATUS "Creating symlink ${source} -> ${target}")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f "${target}")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${source}" "${target}")
else()
message(WARNING "Source '${source}' does not exist. Skipping symlink creation.")
endif()
endfunction()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(BUILD_BOT "Build the bot" ON)
option(BUILD_WEB "Build the web application" ON)
if (BUILD_BOT)
add_subdirectory(bot)
endif()
if (BUILD_WEB)
add_subdirectory(web)
endif()
|