Skip to content

A minimal CMake subproject that powers Discord GameSDK for everyone

License

Notifications You must be signed in to change notification settings

brclofeive/discord-gamesdk-cmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord GameSDK for CMake

A minimal CMake subproject that powers Discord GameSDK for everyone.

How to use?

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
	...
	)

Structure

  • 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.

discord target

It is a wrapper for the imported discord_game_sdk libraries. The source and header files are compiled into what would discord be generated.

Renaming the discord target

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)

How to obtain the libraries?

Read lib/README.md

About

A minimal CMake subproject that powers Discord GameSDK for everyone

Topics

Resources

License

Stars

Watchers

Forks