From b1a7bbd4588957b33500c42d7fab7b4ffe16cfb8 Mon Sep 17 00:00:00 2001 From: Nguyen Marc Date: Sat, 14 Oct 2023 01:01:02 +0200 Subject: qt: add network components when using discord --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1108e5ae6..166024844 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,6 +360,9 @@ function(set_yuzu_qt_components) if (ENABLE_QT_TRANSLATION) list(APPEND YUZU_QT_COMPONENTS2 LinguistTools) endif() + if (USE_DISCORD_PRESENCE) + list(APPEND YUZU_QT_COMPONENTS2 Network) + endif() set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE) endfunction(set_yuzu_qt_components) -- cgit v1.2.3 From 22e4add56295c49ca8d6c3ee693edfd1aba269a9 Mon Sep 17 00:00:00 2001 From: Nguyen Marc Date: Sat, 14 Oct 2023 01:15:28 +0200 Subject: qt: add missing target_link_libraries for discordrpc --- src/yuzu/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 9ebece907..34208ed74 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -384,7 +384,7 @@ if (USE_DISCORD_PRESENCE) discord_impl.cpp discord_impl.h ) - target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib) + target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib Qt${QT_MAJOR_VERSION}::Network) target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE) endif() -- cgit v1.2.3 From a94371f67b9da4fd1f421b2088b4366e3e58a1ad Mon Sep 17 00:00:00 2001 From: Nguyen Marc Date: Sat, 14 Oct 2023 01:42:13 +0200 Subject: cmake: only add network component if qt used --- src/yuzu/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 34208ed74..62392e993 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -384,7 +384,10 @@ if (USE_DISCORD_PRESENCE) discord_impl.cpp discord_impl.h ) - target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib Qt${QT_MAJOR_VERSION}::Network) + target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib) + if (ENABLE_QT) + target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::Network) + endif() target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE) endif() -- cgit v1.2.3 From 63c5340cc4c64e81056f75aaffcca38f5235441f Mon Sep 17 00:00:00 2001 From: Nguyen Marc Date: Sat, 14 Oct 2023 08:46:05 +0200 Subject: Revert "cmake: only add network component if qt used" This reverts commit a94371f67b9da4fd1f421b2088b4366e3e58a1ad. --- src/yuzu/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 62392e993..34208ed74 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -384,10 +384,7 @@ if (USE_DISCORD_PRESENCE) discord_impl.cpp discord_impl.h ) - target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib) - if (ENABLE_QT) - target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::Network) - endif() + target_link_libraries(yuzu PRIVATE DiscordRPC::discord-rpc httplib::httplib Qt${QT_MAJOR_VERSION}::Network) target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE) endif() -- cgit v1.2.3