An open API service indexing awesome lists of open source software.

https://github.com/borfei/discord-gamesdk-cmake

Bringing Discord GameSDK to CMake build system.
https://github.com/borfei/discord-gamesdk-cmake

cmake cpp discord discord-game-sdk

Last synced: 9 months ago
JSON representation

Bringing Discord GameSDK to CMake build system.

Awesome Lists containing this project

README

          

# Discord GameSDK for CMake

> [!NOTE]
> This is no longer maintained as the official Discord GameSDK has been deprecated.

## Overview
A lightweight CMake integration helper for Discord GameSDK. It removes the hassle of manually configuring library paths, include directories, and linking steps when adding Discord features (rich presence, voice, achievements, etc.) to your C/C++ projects.

With this project, you can:
- Easily embed the SDK into any CMake-based build system.
- Link your targets with a simple `target_link_libraries(... discord_gamesdk)`.
- Choose between supported GameSDK versions (e.g. v2.5.6 for stability or v3.2.1 with AArch64 support).
- Keep your project structure clean by isolating all Discord SDK build logic.
- The goal is to provide a plug-and-play way of using Discord’s GameSDK without writing repetitive CMake boilerplate.

## Usage
1. Add the repository as a sub-module:
```sh
git submodule add https://github.com/borfei/discord-gamesdk-cmake.git
```
- Alternatively, you can download the source code [here](https://github.com/borfei/discord-gamesdk-cmake/archive/refs/heads/main.zip).
3. Manually download the additional SDK files:
- There are two versions provided in the official SDK documentation:
- [v3.2.1](https://dl-game-sdk.discordapp.net/3.2.1/discord_game_sdk.zip) - Latest version, includes support for **AArch64**
- [v2.5.6](https://dl-game-sdk.discordapp.net/2.5.6/discord_game_sdk.zip) - Stable version, very stable
- Once downloaded, open the archive and extract the `lib/` folder to this project (not your project)
4. Modify your project's `CMakeLists.txt`:
```cmake
add_subdirectory()
...
target_link_libraries(
...
discord_gamesdk)
```
5. Profit

## License
This project is licensed under the Unlicense license, see [LICENSE](LICENSE) for more information.