From faae0db84c159f9eb7f3d7f081165329bc4a7fb1 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 1 Jul 2017 00:28:42 -0700 Subject: [PATCH] Qt: Fix data directory path --- CHANGES | 1 + src/platform/qt/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d3571ff58..fd8b8a8dd 100644 --- a/CHANGES +++ b/CHANGES @@ -151,6 +151,7 @@ Bugfixes: - Qt: Fix memory search close button (fixes mgba.io/i/769) - Qt: Fix window icon being stretched - Qt: Fix initial window size (fixes mgba.io/i/766) + - Qt: Fix data directory path Misc: - Qt: Add language selector diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 088e26d23..a41e422cc 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -209,7 +209,7 @@ if(NOT DEFINED DATADIR) if(APPLE) set(DATADIR Applications/${PROJECT_NAME}.app/Contents/Resources) else() - set(DATADIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME}) + set(DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/${BINARY_NAME}) endif() endif() install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/shaders DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt) @@ -253,7 +253,7 @@ install(TARGETS ${BINARY_NAME}-qt if(UNIX AND NOT APPLE) find_program(DESKTOP_FILE_INSTALL desktop-file-install) if(DESKTOP_FILE_INSTALL) - install(CODE "execute_process(COMMAND ${DESKTOP_FILE_INSTALL} \"${CMAKE_SOURCE_DIR}/res/mgba-qt.desktop\" --dir \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/applications/\")") + install(CODE "execute_process(COMMAND ${DESKTOP_FILE_INSTALL} \"${CMAKE_SOURCE_DIR}/res/mgba-qt.desktop\" --dir \"\$ENV{DESTDIR}\${CMAKE_INSTALL_FULL_DATADIR}/applications/\")") endif() endif() if(UNIX)