Discord: Add cmake option to disable.

This commit is contained in:
Unknown W. Brackets 2018-11-10 07:39:27 -08:00
parent 67d6e3d384
commit 6bd6b86c05
3 changed files with 10 additions and 4 deletions

View File

@ -131,6 +131,7 @@ option(SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform"
option(LIBRETRO "Set to ON to generate the libretro target" OFF)
# :: Options
option(USE_FFMPEG "Build with FFMPEG support" ${USE_FFMPEG})
option(USE_DISCORD "Build with Discord support" ON)
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
@ -1801,7 +1802,8 @@ if(FFmpeg_FOUND)
endif()
# Discord integration
if(NOT IOS)
if(USE_DISCORD AND NOT IOS)
add_definitions(-DUSE_DISCORD=1)
target_link_libraries(${CoreLibName} discord-rpc)
endif()

View File

@ -9,7 +9,11 @@
#if (PPSSPP_PLATFORM(WINDOWS) || PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(LINUX)) && !PPSSPP_PLATFORM(ANDROID)
#ifdef _MSC_VER
#define ENABLE_DISCORD
#elif USE_DISCORD
#define ENABLE_DISCORD
#endif
#else

View File

@ -2,7 +2,7 @@ set(ARMIPS_REGEXP OFF CACHE BOOL "" FORCE)
add_subdirectory(armips)
if(NOT USING_GLES2)
add_subdirectory(glew)
add_subdirectory(glew)
endif()
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "let's not build binaries we don't need" FORCE)
@ -12,6 +12,6 @@ add_subdirectory(glslang)
add_subdirectory(snappy)
add_subdirectory(udis86)
add_subdirectory(SPIRV-Cross-build)
if(NOT IOS)
add_subdirectory(discord-rpc-build)
if(USE_DISCORD AND NOT IOS)
add_subdirectory(discord-rpc-build)
endif()