enable discord-rpc from vcpkg dependencies

This commit is contained in:
adam-bloom 2021-01-02 22:08:57 -07:00
parent 0caea5460e
commit 29c37b8ae4
2 changed files with 6 additions and 5 deletions

View file

@ -155,9 +155,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
# Note: Discord_RPC can be enabled soon, requires one more CMakeLists update
- name: Build OpenRCT2
run: . scripts/setenv -q && build -DWITH_TESTS=on -DDISABLE_DISCORD_RPC=on -DCMAKE_BUILD_TYPE=MinSizeRel
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel
- name: Run Tests
shell: bash
run: . scripts/setenv -q && run-tests

View file

@ -207,9 +207,11 @@ if (NOT DISABLE_DISCORD_RPC)
add_definitions(-D__ENABLE_DISCORD__)
include_directories(DISCORDRPC_PROCESS_INCLUDES)
endif()
endif()
if (NOT HAVE_DISCORD_RPC AND EXISTS "${ROOT_DIR}/discord-rpc")
elseif (APPLE AND MACOS_USE_DEPENDENCIES)
add_definitions(-D__ENABLE_DISCORD__)
set(HAVE_DISCORD_RPC TRUE)
message("Building with libdiscord-rpc.dylib")
elseif(NOT HAVE_DISCORD_RPC AND EXISTS "${ROOT_DIR}/discord-rpc")
# Don't build discord's examples, some of which are in C and do not honour
# the flags we set for C++. Also we don't use the provided examples.
set(BUILD_EXAMPLES OFF CACHE BOOL "Build example apps")