Qt: Hopefully fix datadir this time

This commit is contained in:
Vicki Pfau 2017-07-04 00:05:19 -07:00
parent ab9b398317
commit ccd9a1b54b
1 changed files with 3 additions and 3 deletions

View File

@ -209,13 +209,13 @@ if(NOT DEFINED DATADIR)
if(APPLE) if(APPLE)
set(DATADIR Applications/${PROJECT_NAME}.app/Contents/Resources) set(DATADIR Applications/${PROJECT_NAME}.app/Contents/Resources)
else() else()
set(DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/${BINARY_NAME}) set(DATADIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME})
endif() endif()
endif() endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/shaders DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt) install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/shaders DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt)
install(FILES ${CMAKE_SOURCE_DIR}/res/nointro.dat DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt) install(FILES ${CMAKE_SOURCE_DIR}/res/nointro.dat DESTINATION ${DATADIR} COMPONENT ${BINARY_NAME}-qt)
if(NOT WIN32 AND NOT APPLE) if(NOT WIN32 AND NOT APPLE)
list(APPEND QT_DEFINES DATADIR="${DATADIR}") list(APPEND QT_DEFINES DATADIR="${CMAKE_INSTALL_PREFIX}/${DATADIR}")
endif() endif()
find_package(Qt5LinguistTools) find_package(Qt5LinguistTools)
@ -253,7 +253,7 @@ install(TARGETS ${BINARY_NAME}-qt
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
find_program(DESKTOP_FILE_INSTALL desktop-file-install) find_program(DESKTOP_FILE_INSTALL desktop-file-install)
if(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()
endif() endif()
if(UNIX) if(UNIX)