![]() |
D++ (DPP)
C++ Discord API Bot Library
|
To add D++ to a CLion project, you need obtain the library through vcpkg and then configure your CLion project and CMakeLists.txt
.
vcpkg install dpp:x64-windows
(replace x64-windows with whichever OS and architecture you want the library to be built for).vcpkg list dpp
. ``` C:/vcpkg>vcpkg list dpp dpp:x64-windows 10.0.23 D++ Extremely Lightweight C++ Discord Library. ``` For example, if your root folder is
C:/vcpkg/then the CMake option will be:
`` -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ```CMakeLists.txt
: ```cmake find_package(dpp CONFIG REQUIRED) target_link_libraries(main PRIVATE dpp::dpp) target_include_directories(main PRIVATE path_to_vcpkg_root_folder/installed/architecture-os/include) `` For example, if built for x64-windows and vcpkg root is
C:/vcpkg/then your
CMakeLists.txt<tt>should look like this: ``cmake find_package(dpp CONFIG REQUIRED) target_link_libraries(main PRIVATE dpp::dpp) target_include_directories(main PRIVATE C:/vcpkg/installed/x64-windows/include) ```