diff options
author | Cara Salter <cara@devcara.com> | 2023-03-30 12:52:19 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2023-03-30 12:52:19 -0400 |
commit | 527b7ab2df126bb2f480999049ed05b057a6ef83 (patch) | |
tree | 8edb7c72d7fae0e7d2c768f5f5dd65c2268c75a0 /CMakeLists.txt | |
parent | c8befe7c95b18869f995c4f2cbc2f4cf9c91924f (diff) | |
download | 142bot-527b7ab2df126bb2f480999049ed05b057a6ef83.tar.gz 142bot-527b7ab2df126bb2f480999049ed05b057a6ef83.zip |
modules!
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 001f41f..1b2e67c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(142-bot VERSION 0.1 LANGUAGES CXX C) -set(CMAKE_C_STANDARD 11 REQUIRED) +set(CMAKE_CXX_STANDARD 20 REQUIRED) include(FetchContent) FetchContent_Declare(clog @@ -16,4 +16,23 @@ FetchContent_Declare(dpp FetchContent_MakeAvailable(clog dpp) -add_subdirectory(src) +find_package(fmt) + +string(ASCII 27 Esc) + +aux_source_directory("src" coresrc) +add_executable(142bot ${coresrc}) + +include_directories("include") +target_link_libraries(142bot clog dpp fmt spdlog) + +set (modules_dir "modules") +file(GLOB subdirlist ${modules_dir}/*) +foreach (fullmodname ${subdirlist}) + get_filename_component(modname ${fullmodname} NAME) + message(STATUS "Found module '${Esc}[1;34mmodule_${modname}${Esc}[m'") + set (modsrc "") + aux_source_directory(${modules_dir}/${modname} modsrc) + add_library(module_${modname} SHARED ${modsrc}) + set_target_properties(module_${modname} PROPERTIES PREFIX "") +endforeach(fullmodname) |