From 04ad430115f3ccdf22d013d0c3e2efd38b444df1 Mon Sep 17 00:00:00 2001
From: Alexandre Bouvier <contact@amb.tf>
Date: Fri, 11 Oct 2024 06:26:30 +0000
Subject: [PATCH] cmake: add install rules (#1341)

---
 CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c58af6b..3f3d7fcf 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -872,3 +872,11 @@ endif()
 
 # Discord RPC
 target_link_libraries(shadps4 PRIVATE discord-rpc)
+
+# Install rules
+install(TARGETS shadps4 BUNDLE DESTINATION .)
+
+if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    install(FILES ".github/shadps4.desktop" DESTINATION "share/applications")
+    install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps")
+endif()