mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 12:35:52 +03:00
Use CMAKE_INSTALL_DATADIR instead of custom DATADIR
CMake provides what we wan out of the box Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
This commit is contained in:
parent
d247e4791a
commit
18ddb9df4a
5 changed files with 10 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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})
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue