diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e2a63e58..156c4e747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,11 +96,7 @@ endif() message(STATUS "GIT_SHA1 ${GIT_SHA1}") set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) -set(DATADIR ${DATA_INSTALL_DIR}) -if(WIN32) -set(DATADIR "share") -endif(WIN32) -set(SHAREDIR ${DATADIR}) +set(SHAREDIR ${CMAKE_INSTALL_DATADIR}) ##### ## handle BUILD_OWNCLOUD_OSX_BUNDLE diff --git a/shell_integration/icons/CMakeLists.txt b/shell_integration/icons/CMakeLists.txt index 04235c55b..c77fecac7 100644 --- a/shell_integration/icons/CMakeLists.txt +++ b/shell_integration/icons/CMakeLists.txt @@ -1,6 +1,6 @@ if( UNIX AND NOT APPLE ) - SET(ICON_DIR ${DATADIR}/icons/hicolor) + SET(ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor) FOREACH(size 128x128 16x16 256x256 32x32 48x48 64x64 72x72) file(GLOB files "${size}/*.png") diff --git a/shell_integration/nautilus/CMakeLists.txt b/shell_integration/nautilus/CMakeLists.txt index d8f75d8a5..8d8a759a3 100644 --- a/shell_integration/nautilus/CMakeLists.txt +++ b/shell_integration/nautilus/CMakeLists.txt @@ -25,9 +25,9 @@ if( UNIX AND NOT APPLE ) ERROR_VARIABLE errors OUTPUT_VARIABLE out) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${DATADIR}/nemo-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_caja.py DESTINATION ${DATADIR}/caja-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${CMAKE_INSTALL_DATADIR}/nautilus-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${CMAKE_INSTALL_DATADIR}/nemo-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_caja.py DESTINATION ${CMAKE_INSTALL_DATADIR}/caja-python/extensions RENAME syncstate-${APPLICATION_SHORTNAME}.py) diff --git a/src/csync/ConfigureChecks.cmake b/src/csync/ConfigureChecks.cmake index 9aac6673a..0910aa5b6 100644 --- a/src/csync/ConfigureChecks.cmake +++ b/src/csync/ConfigureChecks.cmake @@ -7,7 +7,6 @@ include(CheckCXXSourceCompiles) set(PACKAGE ${APPLICATION_NAME}) set(VERSION ${APPLICATION_VERSION}) -set(DATADIR ${DATA_INSTALL_DIR}) set(LIBDIR ${LIB_INSTALL_DIR}) set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index efe1b1c34..9b0028fe1 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -365,9 +365,9 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE) foreach(_file ${_icons}) string(REPLACE "${theme_dir}/colored/" "" _res ${_file}) string(REPLACE "-${APPLICATION_ICON_NAME}-icon.png" "" _res ${_res}) - install(FILES ${_file} RENAME ${APPLICATION_ICON_NAME}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps) + install(FILES ${_file} RENAME ${APPLICATION_ICON_NAME}.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${_res}x${_res}/apps) endforeach(_file) - install(FILES ${client_I18N} DESTINATION ${SHAREDIR}/${APPLICATION_EXECUTABLE}/i18n) + install(FILES ${client_I18N} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPLICATION_EXECUTABLE}/i18n) else() file(GLOB_RECURSE VISUAL_ELEMENTS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-w10startmenu*") install(FILES ${VISUAL_ELEMENTS} DESTINATION bin/visualelements) @@ -517,13 +517,13 @@ endif() if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32) configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${DATADIR}/applications ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications ) configure_file(owncloud.xml.in ${APPLICATION_EXECUTABLE}.xml) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.xml DESTINATION ${DATADIR}/mime/packages ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages ) find_package(SharedMimeInfo) if(SharedMimeInfo_FOUND) - update_xdg_mimetypes( ${DATADIR}/mime/packages ) + update_xdg_mimetypes( ${CMAKE_INSTALL_DATADIR}/mime/packages ) endif(SharedMimeInfo_FOUND) endif()