]> git.lyx.org Git - features.git/commitdiff
Adapt support for distributing desktop files and icons also in cmake build
authorKornel Benko <kornel@lyx.org>
Tue, 20 Dec 2011 13:49:55 +0000 (13:49 +0000)
committerKornel Benko <kornel@lyx.org>
Tue, 20 Dec 2011 13:49:55 +0000 (13:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40532 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/Install.cmake

index db2d7b5bd17f68cf465068a5e153015b907ba936..5402d5bc42669f4afa65c1e6968fe04a89f5f2c4 100755 (executable)
@@ -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()