diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index db2d7b5bd1..5402d5bc42 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -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()