Cmake build: Install lyx*.desktop and lyx*.svg files in appropriate locations for unix

This commit is contained in:
Kornel Benko 2014-05-09 10:04:42 +02:00
parent 6b0a8fbc96
commit 2ebcf38493
2 changed files with 4 additions and 3 deletions

View File

@ -373,13 +373,14 @@ if(LYX_INSTALL_PREFIX)
endif()
set(LYX_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
string(REGEX REPLACE "/lyx${LYX_INSTALL_SUFFIX}$" "/share" SYSTEM_DATADIR ${CMAKE_INSTALL_PREFIX})
if(LYX_PACKAGE_SUFFIX)
set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
else()
set(PACKAGE ${PACKAGE_BASE})
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# see http://www.cmake.org/pipermail/cmake/2006-October/011559.html
if (UNIX)

View File

@ -113,6 +113,6 @@ if(APPLE)
elseif(UNIX)
set(program_suffix ${PROGRAM_SUFFIX})
configure_file(${TOP_SRC_DIR}/lib/lyx.desktop.in lyx${PROGRAM_SUFFIX}.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx${PROGRAM_SUFFIX}.desktop DESTINATION applications)
install(FILES ${TOP_SRC_DIR}/lib/images/lyx.svg RENAME lyx${PROGRAM_SUFFIX}.svg DESTINATION images)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx${PROGRAM_SUFFIX}.desktop DESTINATION ${SYSTEM_DATADIR}/applications)
install(FILES ${TOP_SRC_DIR}/lib/images/lyx.svg RENAME lyx${PROGRAM_SUFFIX}.svg DESTINATION ${SYSTEM_DATADIR}/icons/hicolor/scalable/apps/)
endif()