mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
relocated discord-rpc cmake
This commit is contained in:
parent
1745c8c607
commit
7ab13a44d7
36
3rdparty/CMakeLists.txt
vendored
36
3rdparty/CMakeLists.txt
vendored
@ -179,40 +179,8 @@ add_library(3rdparty_stblib INTERFACE)
|
||||
target_include_directories(3rdparty_stblib INTERFACE stblib)
|
||||
|
||||
|
||||
# discord_rpc
|
||||
add_library(3rdparty_discord-rpc INTERFACE)
|
||||
|
||||
# We don't want Discord Rich Presence on the BSDs and other OSes
|
||||
if (USE_DISCORD_RPC AND (WIN32 OR CMAKE_SYSTEM MATCHES "Linux" OR APPLE))
|
||||
if (WIN32 AND NOT MSVC)
|
||||
ExternalProject_Add(discord-rpc
|
||||
GIT_REPOSITORY https://github.com/discordapp/discord-rpc
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/discord-rpc
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
target_include_directories(3rdparty_discord-rpc INTERFACE discord-rpc/include)
|
||||
target_compile_definitions(3rdparty_discord-rpc INTERFACE -DWITH_DISCORD_RPC)
|
||||
|
||||
set(DISCORD_RPC_LIB NOTFOUND)
|
||||
if (WIN32)
|
||||
if (NOT MSVC)
|
||||
set(DISCORD_RPC_LIB ${CMAKE_CURRENT_BINARY_DIR}/discord-rpc/src/libdiscord-rpc.a)
|
||||
else()
|
||||
find_library(DISCORD_RPC_LIB discord-rpc PATHS discord-rpc/lib/ NO_DEFAULT_PATH)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM MATCHES "Linux")
|
||||
find_library(DISCORD_RPC_LIB discord-rpc-linux PATHS discord-rpc/lib/ NO_DEFAULT_PATH)
|
||||
elseif(APPLE)
|
||||
find_library(DISCORD_RPC_LIB discord-rpc-mac PATHS discord-rpc/lib/ NO_DEFAULT_PATH)
|
||||
endif()
|
||||
target_link_libraries(3rdparty_discord-rpc INTERFACE ${DISCORD_RPC_LIB})
|
||||
if(APPLE)
|
||||
target_link_libraries(3rdparty_discord-rpc INTERFACE "objc" "-framework Foundation" "-framework CoreServices")
|
||||
endif()
|
||||
endif()
|
||||
# discord rpc
|
||||
add_subdirectory(discord-rpc)
|
||||
|
||||
|
||||
# ALSA
|
||||
|
34
3rdparty/discord-rpc/CMakeLists.txt
vendored
Normal file
34
3rdparty/discord-rpc/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
# discord_rpc
|
||||
add_library(3rdparty_discord-rpc INTERFACE)
|
||||
|
||||
# We don't want Discord Rich Presence on the BSDs and other OSes
|
||||
if (USE_DISCORD_RPC AND (WIN32 OR CMAKE_SYSTEM MATCHES "Linux" OR APPLE))
|
||||
if (WIN32 AND NOT MSVC)
|
||||
ExternalProject_Add(discord-rpc
|
||||
GIT_REPOSITORY https://github.com/discordapp/discord-rpc
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
target_include_directories(3rdparty_discord-rpc INTERFACE include)
|
||||
target_compile_definitions(3rdparty_discord-rpc INTERFACE -DWITH_DISCORD_RPC)
|
||||
|
||||
set(DISCORD_RPC_LIB NOTFOUND)
|
||||
if (WIN32)
|
||||
if (NOT MSVC)
|
||||
set(DISCORD_RPC_LIB ${CMAKE_CURRENT_BINARY_DIR}/src/libdiscord-rpc.a)
|
||||
else()
|
||||
find_library(DISCORD_RPC_LIB discord-rpc PATHS lib/ NO_DEFAULT_PATH)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM MATCHES "Linux")
|
||||
find_library(DISCORD_RPC_LIB discord-rpc-linux PATHS lib/ NO_DEFAULT_PATH)
|
||||
elseif(APPLE)
|
||||
find_library(DISCORD_RPC_LIB discord-rpc-mac PATHS lib/ NO_DEFAULT_PATH)
|
||||
endif()
|
||||
target_link_libraries(3rdparty_discord-rpc INTERFACE ${DISCORD_RPC_LIB})
|
||||
if(APPLE)
|
||||
target_link_libraries(3rdparty_discord-rpc INTERFACE "objc" "-framework Foundation" "-framework CoreServices")
|
||||
endif()
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user