D++ (DPP)
C++ Discord API Bot Library
Building with CMake

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 different directories and files like below:

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

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

3. Configure CMake

Here is an example of a 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)
# Create an executable
add_executable(${PROJECT_NAME}
src/main.cpp
# your others files...
)
# Linking libraries
target_link_libraries(${PROJECT_NAME}
dpp
spdlog # if you need a logger. Don't forget to clone sources
# in the `libs/` directory
)
# 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.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ 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