From 729fa7c253def7ac62649933e15bc309a4191829 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 15 Mar 2012 17:24:07 +0100 Subject: [PATCH] Do not py-compile also on cmake build, backport r40648 --- development/cmake/Install.cmake | 33 +++++++++++++++++++----- development/cmake/lyx2lyx/CMakeLists.txt | 2 +- development/cmake/scripts/CMakeLists.txt | 2 +- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index e5aae34c41..ec3c2142d3 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -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) + diff --git a/development/cmake/lyx2lyx/CMakeLists.txt b/development/cmake/lyx2lyx/CMakeLists.txt index ed30a54d31..6cfa5cd303 100644 --- a/development/cmake/lyx2lyx/CMakeLists.txt +++ b/development/cmake/lyx2lyx/CMakeLists.txt @@ -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) diff --git a/development/cmake/scripts/CMakeLists.txt b/development/cmake/scripts/CMakeLists.txt index 2274dc0506..a9439b7c51 100644 --- a/development/cmake/scripts/CMakeLists.txt +++ b/development/cmake/scripts/CMakeLists.txt @@ -7,6 +7,6 @@ if (UNIX) set(_project "scripts") - include(../PyCompile) + # include(../PyCompile) endif() -- 2.39.5