]> git.lyx.org Git - features.git/commitdiff
Do not py-compile also on cmake build, backport r40648
authorKornel Benko <kornel@lyx.org>
Thu, 15 Mar 2012 16:24:07 +0000 (17:24 +0100)
committerKornel Benko <kornel@lyx.org>
Thu, 15 Mar 2012 16:24:07 +0000 (17:24 +0100)
development/cmake/Install.cmake
development/cmake/lyx2lyx/CMakeLists.txt
development/cmake/scripts/CMakeLists.txt

index e5aae34c41dc43ef529449893f246506135831d3..ec3c2142d3584cdd4fc3b17ac3e9ce172075790a 100755 (executable)
@@ -27,17 +27,30 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
         file(GLOB _item_list ${_current_dir}/${_file_type})
         #cmake bug: globbing with * also returns directories on Windows
         set(files_list ${_item_list})
+       set(program_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()
+             if(_current_item MATCHES "\\.in$")
+               #message(STATUS "removing .in file ${_current_item}")
+               list(REMOVE_ITEM files_list "${_current_item}")
+             endif()
+             if(_current_item MATCHES "\\.py$")
+               list(REMOVE_ITEM files_list "${_current_item}")
+               list(APPEND program_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}/lyx.svg")
           list(REMOVE_ITEM files_list "${_current_dir}/Makefile.am")
           list(REMOVE_ITEM files_list "${_current_dir}/layouttranslations")
           GET_FILENAME_COMPONENT(_base_dir ${_current_dir} NAME)
@@ -48,6 +61,12 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
           #message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${LYX_DATA_SUBDIR}${_dir}/${_base_dir}")
           install(FILES ${files_list} DESTINATION ${LYX_DATA_SUBDIR}${_dir}/${_base_dir})
         endif()
+       if(program_list)
+         if(_glob_dir STREQUAL ".")
+           set(_base_dir .)
+         endif()
+         install(PROGRAMS ${program_list} DESTINATION ${LYX_DATA_SUBDIR}${_dir}/${_base_dir})
+       endif()
       endforeach(_current_dir)
     endforeach(_glob_dir)
   endforeach(_dir)
@@ -80,3 +99,5 @@ lyx_install(${TOP_SRC_DIR}/lib tex          *      .)
 lyx_install(${TOP_SRC_DIR}/lib ui           *      .)
 lyx_install(${TOP_SRC_DIR}/lib .            *      .)
 
+install(PROGRAMS ${TOP_SRC_DIR}/lib/scripts/listerrors DESTINATION scripts)
+
index ed30a54d31083ca4dc6767b4d892ace3695eb669..6cfa5cd3038a8dbfb3f471dac2d304e9454fb374 100644 (file)
@@ -11,7 +11,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION ${LYX_D
 
 if (UNIX)
        set(_project "lyx2lyx")
-       include(../PyCompile)
+       include(../PyCompile)
 endif()
 
 install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION ${LYX_DATA_SUBDIR}lyx2lyx)
index 2274dc0506b163282ece01da20265a52decd4fb4..a9439b7c51e4d290e55bb7d44ca7bde2f0c1e5f3 100644 (file)
@@ -7,6 +7,6 @@
 
 if (UNIX)
        set(_project "scripts")
-       include(../PyCompile)
+       include(../PyCompile)
 endif()