]> git.lyx.org Git - features.git/commitdiff
Do not install _any_ hidden file in cmake build
authorKornel Benko <kornel@lyx.org>
Sun, 18 Dec 2011 12:56:38 +0000 (12:56 +0000)
committerKornel Benko <kornel@lyx.org>
Sun, 18 Dec 2011 12:56:38 +0000 (12:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40518 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/Install.cmake

index 8f095ffdef1560de65b0aa80dab637f26c31ced3..db2d7b5bd17f68cf465068a5e153015b907ba936 100755 (executable)
@@ -28,15 +28,19 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
         #cmake bug: globbing with * also returns directories on Windows
         set(files_list ${_item_list})
         foreach(_current_item ${_item_list})
-          if(IS_DIRECTORY ${_current_item})
-            #message(STATUS "removing ${_current_item}")
-            if(files_list)
+         if(files_list)
+           if(IS_DIRECTORY ${_current_item})
+             #message(STATUS "removing dir ${_current_item}")
               list(REMOVE_ITEM files_list "${_current_item}")
-            endif()
+            else()
+             if(_current_item MATCHES "/\\.[^/]+$")
+               #message(STATUS "removing hidden ${_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}/.svn")
           list(REMOVE_ITEM files_list "${_current_dir}/Makefile.in")
           list(REMOVE_ITEM files_list "${_current_dir}/Makefile.am")
           list(REMOVE_ITEM files_list "${_current_dir}/layouttranslations")
@@ -82,5 +86,9 @@ lyx_install(${TOP_SRC_DIR}/lib ui           *      .)
 lyx_install(${TOP_SRC_DIR}/lib .            *      .)
 
 if(UNIX)
-  install(FILES ${TOP_SRC_DIR}/lib/lyx.desktop DESTINATION applications)
+  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()
 endif()