summaryrefslogtreecommitdiffstats
path: root/externals/find-modules/FindDiscordRPC.cmake
diff options
context:
space:
mode:
authorAlexandre Bouvier <contact@amb.tf>2022-11-25 19:35:46 +0100
committerAlexandre Bouvier <contact@amb.tf>2022-12-04 17:09:25 +0100
commit8e17b5469fc7f5211fc3e24841896ea030adce84 (patch)
treec5baf2ed91c115c7f07063297d2cd611e73b6713 /externals/find-modules/FindDiscordRPC.cmake
parentMerge pull request #9375 from jbeich/xbyak-no-install (diff)
downloadyuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar.gz
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar.bz2
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar.lz
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar.xz
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.tar.zst
yuzu-8e17b5469fc7f5211fc3e24841896ea030adce84.zip
Diffstat (limited to '')
-rw-r--r--externals/find-modules/FindDiscordRPC.cmake27
1 files changed, 27 insertions, 0 deletions
diff --git a/externals/find-modules/FindDiscordRPC.cmake b/externals/find-modules/FindDiscordRPC.cmake
new file mode 100644
index 000000000..44ca9904f
--- /dev/null
+++ b/externals/find-modules/FindDiscordRPC.cmake
@@ -0,0 +1,27 @@
+# SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+find_path(DiscordRPC_INCLUDE_DIR discord_rpc.h)
+
+find_library(DiscordRPC_LIBRARY discord-rpc)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(DiscordRPC
+ REQUIRED_VARS
+ DiscordRPC_LIBRARY
+ DiscordRPC_INCLUDE_DIR
+)
+
+if (DiscordRPC_FOUND AND NOT TARGET DiscordRPC::discord-rpc)
+ add_library(DiscordRPC::discord-rpc UNKNOWN IMPORTED)
+ set_target_properties(DiscordRPC::discord-rpc PROPERTIES
+ IMPORTED_LOCATION "${DiscordRPC_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${DiscordRPC_INCLUDE_DIR}"
+ )
+endif()
+
+mark_as_advanced(
+ DiscordRPC_INCLUDE_DIR
+ DiscordRPC_LIBRARY
+)