mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add discord-rpc support to Linux
This commit is contained in:
parent
58e8ef5de4
commit
8f3434d084
|
@ -102,6 +102,12 @@ set(COMMON_COMPILE_OPTIONS "${COMMON_COMPILE_OPTIONS} -fstrict-overflow")
|
|||
ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_STRICT_OVERFLOW -Wstrict-overflow=1)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_STRICT_OVERFLOW -Wstrict-overflow=1)
|
||||
|
||||
if(EXISTS discord-rpc)
|
||||
add_subdirectory(discord-rpc)
|
||||
add_definitions(-D__ENABLE_DISCORD__)
|
||||
include_directories(discord-rpc/include)
|
||||
set(HAVE_DISCORD_RPC TRUE)
|
||||
endif()
|
||||
|
||||
# Include sub-projects
|
||||
include("${ROOT_DIR}/src/openrct2/CMakeLists.txt" NO_POLICY_SCOPE)
|
||||
|
|
|
@ -97,6 +97,8 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
|||
brew install jansson sdl2 sdl2_ttf speex --universal
|
||||
fi
|
||||
elif [[ $(uname) == "Linux" ]]; then
|
||||
# Clone discord-rpc for Discord's Rich Presence support
|
||||
git clone https://github.com/discordapp/discord-rpc
|
||||
# prevent build.sh from re-doing all the steps again
|
||||
case "$TARGET" in
|
||||
"ubuntu_i686")
|
||||
|
|
|
@ -198,6 +198,10 @@ if (UNIX OR STATIC OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
|||
target_link_libraries(${PROJECT} ${ICONV_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (HAVE_DISCORD_RPC)
|
||||
target_link_libraries(libopenrct2 discord-rpc)
|
||||
endif()
|
||||
|
||||
# Includes
|
||||
target_include_directories(${PROJECT} SYSTEM PRIVATE ${LIBZIP_INCLUDE_DIRS})
|
||||
target_include_directories(${PROJECT} PUBLIC ${JANSSON_INCLUDE_DIRS})
|
||||
|
|
Loading…
Reference in New Issue