Adapt support for distributing desktop files and icons also in cmake build

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40532 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2011-12-20 13:49:55 +00:00
parent 2bf021ee73
commit 28b401b40e

View File

@ -37,14 +37,17 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
#message(STATUS "removing hidden ${_current_item}")
list(REMOVE_ITEM files_list "${_current_item}")
endif()
if(_current_item MATCHES "\\.in$")
#message(STATUS "removing .in file ${_current_item}")
list(REMOVE_ITEM files_list "${_current_item}")
endif()
endif()
endif()
endforeach(_current_item)
if(files_list)
list(REMOVE_ITEM files_list "${_current_dir}/Makefile.in")
list(REMOVE_ITEM files_list "${_current_dir}/lyx.svg")
list(REMOVE_ITEM files_list "${_current_dir}/Makefile.am")
list(REMOVE_ITEM files_list "${_current_dir}/layouttranslations")
list(REMOVE_ITEM files_list "${_current_dir}/lyx.desktop")
GET_FILENAME_COMPONENT(_base_dir ${_current_dir} NAME)
if(_glob_dir STREQUAL ".")
set(_base_dir .)
@ -86,9 +89,8 @@ lyx_install(${TOP_SRC_DIR}/lib ui * .)
lyx_install(${TOP_SRC_DIR}/lib . * .)
if(UNIX)
if (LYX_PROGRAM_SUFFIX)
install(FILES ${TOP_SRC_DIR}/lib/lyx.desktop DESTINATION applications RENAME lyx${PROGRAM_SUFFIX}.desktop)
else()
install(FILES ${TOP_SRC_DIR}/lib/lyx.desktop DESTINATION applications)
endif()
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)
endif()