aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/CMakeLists.txt
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-01-28 21:37:36 +0100
committerGitHub <noreply@github.com>2020-01-28 21:37:36 +0100
commit2c51a495274106bc39b04f3ef99b217f5df21a21 (patch)
tree11f98cf0e8c087964943acdbac00ed618a559824 /src/libui_sdl/CMakeLists.txt
parent8b9eef352c9ea00f1dc8fbe37ecab79cd8630b3c (diff)
parentc5623c4dcd122278e45a363b655be67d845ecf63 (diff)
Merge pull request #546 from nadiaholmquist/feature/unix-xdg
Make melonDS properly installable systemwide on UNIX systems
Diffstat (limited to 'src/libui_sdl/CMakeLists.txt')
-rw-r--r--src/libui_sdl/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libui_sdl/CMakeLists.txt b/src/libui_sdl/CMakeLists.txt
index 64206bf..2d384e4 100644
--- a/src/libui_sdl/CMakeLists.txt
+++ b/src/libui_sdl/CMakeLists.txt
@@ -31,6 +31,11 @@ target_link_libraries(melonDS
core ${SDL2_LIBRARIES} libui)
if (UNIX)
+ option(UNIX_PORTABLE "Make a portable build that looks for its configuration in the current directory" OFF)
+ if (UNIX_PORTABLE)
+ add_definitions(-DUNIX_PORTABLE)
+ endif()
+
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(SDL2 REQUIRED sdl2)
@@ -61,4 +66,7 @@ elseif (WIN32)
target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi)
endif ()
+install(FILES ../../net.kuribo64.melonDS.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
+install(FILES ../../icon/melon_256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME net.kuribo64.melonDS.png)
+install(FILES ../../romlist.bin DESTINATION ${CMAKE_INSTALL_PREFIX}/share/melonDS)
install(TARGETS melonDS RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)