A minimal CMake subproject that powers Discord GameSDK for everyone.
Clone it as a git submodule of your project, or something else.
Modify your project's CMakeLists.txt
:
add_subdirectory(discord_gamesdk_cmake)
...
...
target_link_libraries(YOUR_TARGET
discord
...
)
lib
- Where it's imported libraries reside, read lib/README.md for more info.src
- Source and header files for Discord GameSDK, which makes use of the imported libraries.
It is a wrapper for the imported discord_game_sdk
libraries. The source and header files are compiled into what would discord
be generated.
You might want to rename it because it's not looking fit for your project.
Simply replace line 6 with this code in the parent CMakeLists.txt
:
set(DISCORD_GAMESDK_BIN_RUNTIME "${CMAKE_CURRENT_BINARY_DIR}/YOURNAME.dll" PARENT_SCOPE)
If you are targeting for Windows, also replace line 45:
set(DISCORD_GAMESDK_BIN_RUNTIME "${CMAKE_CURRENT_BINARY_DIR}/YOURNAME.so" PARENT_SCOPE)
Read lib/README.md