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)
#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)
lyx_install(${TOP_SRC_DIR}/lib ui * .)
lyx_install(${TOP_SRC_DIR}/lib . * .)
+install(PROGRAMS ${TOP_SRC_DIR}/lib/scripts/listerrors DESTINATION scripts)
+