From ac5fa184a8fcb20363ba49a627a36f11103e590a Mon Sep 17 00:00:00 2001 From: staphen Date: Sat, 2 Apr 2022 23:57:57 -0400 Subject: [PATCH] Only install discord shared library on Windows --- 3rdParty/discord/CMakeLists.txt | 5 +---- CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/3rdParty/discord/CMakeLists.txt b/3rdParty/discord/CMakeLists.txt index b1327d7d4..16520f0e3 100644 --- a/3rdParty/discord/CMakeLists.txt +++ b/3rdParty/discord/CMakeLists.txt @@ -29,8 +29,5 @@ else() set_property(TARGET discord_game_sdk PROPERTY IMPORTED_LOCATION ${DISCORD_SHARED_LIB}) endif() +set(DISCORD_SHARED_LIB ${DISCORD_SHARED_LIB} PARENT_SCOPE) file(COPY ${DISCORD_SHARED_LIB} DESTINATION "${CMAKE_BINARY_DIR}") - -if(CPACK) - install(FILES ${DISCORD_SHARED_LIB} DESTINATION ".") -endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index f49050e2a..aee249cb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,6 +436,12 @@ if(CPACK AND (APPLE OR BUILD_ASSETS_MPQ OR SRC_DIST)) ) endforeach() + if(DISCORD_SHARED_LIB) + install(FILES "${DISCORD_SHARED_LIB}" + DESTINATION "." + ) + endif() + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") string(TOLOWER ${PROJECT_NAME} project_name) set(CPACK_PACKAGE_NAME ${project_name})