Build: Fix DiscordRPC not being included in Mac bundle

This commit is contained in:
Stenzek
2024-07-14 21:23:16 +10:00
parent 500fbe5ef1
commit df979d4648
3 changed files with 12 additions and 5 deletions

View File

@ -200,6 +200,13 @@ endfunction()
function(add_core_resources target)
add_util_resources(${target})
if(APPLE)
# Copy discord-rpc into the bundle
get_target_property(DISCORD_RPC_LIBRARY DiscordRPC::discord-rpc IMPORTED_LOCATION_RELEASE)
target_sources(${target} PRIVATE "${DISCORD_RPC_LIBRARY}")
set_source_files_properties("${DISCORD_RPC_LIBRARY}" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
endif()
file(GLOB_RECURSE RESOURCE_FILES ${CMAKE_SOURCE_DIR}/data/resources/*)
foreach(path IN LISTS RESOURCE_FILES)
get_filename_component(file ${path} NAME)