D++ (DPP)
C++ Discord API Bot Library
Building a Discord Bot using CMake/UNIX

Building with CMake

1. Toolchain

Before compiling, you will need to install cmake on your system. To be sure that cmake is installed, you can type the following command:

$ cmake --version
cmake version 3.20.4

2. Create a CMake project

In an empty directory, create the following files and directories:

- your_project/
    |-- libs/
    |-- src/
        |-- main.cpp
    |-- CMakeLists.txt

In the libs/ directory, clone D++ with: git clone https://github.com/brainboxdotcc/DPP.git

3. Configure CMake

Here is an example CMake configuration, adapt it according to your needs:

# minimum CMake version required
cmake_minimum_required(VERSION 3.15)
# Project name, version and description
project(discord-bot VERSION 1.0 DESCRIPTION "A discord bot")
# Add DPP as dependency
add_subdirectory(libs/DPP)
add_subdirectory(libs/spdlog) # if you need a logger. Don't forget to clone sources
# in the `libs/` directory
# Create an executable
add_executable(${PROJECT_NAME}
src/main.cpp
# your others files...
)
# Linking libraries
target_link_libraries(${PROJECT_NAME}
dpp
spdlog # Like before, if you need spdlog
)
# Specify includes
target_include_directories(${PROJECT_NAME} PRIVATE
libs/DPP/include
libs/spdlog/include # Like before, if you need spdlog
)
# Set C++ version
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 17 # or 20 if you want something more recent
CXX_STANDARD_REQUIRED ON
)

Your project directory should look like this:

- your_project/
    |-- libs/
        |-- DPP
        |-- spdlog # again, only if you need it
    |-- src/
        |-- main.cpp
    |-- CMakeLists.txt

Have fun!

D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0