mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
Cmake install: Exclude some files from being installed
Files like CMakeLists.txt or *.lyx~ should not be part of an installation.
This commit is contained in:
parent
f6dd83a936
commit
882b7b01d0
@ -9,6 +9,9 @@ endif()
|
|||||||
# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files
|
# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files
|
||||||
# and installs the files in CMAKE_INSTALL_PREFIX/_current_dir
|
# and installs the files in CMAKE_INSTALL_PREFIX/_current_dir
|
||||||
# dir_item is on item of the remaining arguments
|
# dir_item is on item of the remaining arguments
|
||||||
|
#
|
||||||
|
# Special handling for ${_file_type} == "*"
|
||||||
|
# Here we try to exclude files which we do not want to install
|
||||||
macro(lyx_install _parent_src_dir _gl_dir _file_type)
|
macro(lyx_install _parent_src_dir _gl_dir _file_type)
|
||||||
#message("checking parents ${_parent_src_dir}")
|
#message("checking parents ${_parent_src_dir}")
|
||||||
file(GLOB _dirs RELATIVE "${_parent_src_dir}" ${_parent_src_dir}/${_gl_dir})
|
file(GLOB _dirs RELATIVE "${_parent_src_dir}" ${_parent_src_dir}/${_gl_dir})
|
||||||
@ -36,17 +39,13 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
|
|||||||
#message(STATUS "removing dir ${_current_item}")
|
#message(STATUS "removing dir ${_current_item}")
|
||||||
list(REMOVE_ITEM files_list "${_current_item}")
|
list(REMOVE_ITEM files_list "${_current_item}")
|
||||||
else()
|
else()
|
||||||
if(_current_item MATCHES "/\\.[^/]+$")
|
if ("${_file_type}" STREQUAL "*")
|
||||||
#message(STATUS "removing hidden ${_current_item}")
|
foreach(_mask "/\\.[^/]+$" "\\.in$" "\\.py$" "CMakeLists\\.txt$" "\\.lyx~$")
|
||||||
list(REMOVE_ITEM files_list "${_current_item}")
|
if(_current_item MATCHES ${_mask})
|
||||||
endif()
|
#message(STATUS "removing item ${_current_item}")
|
||||||
if(_current_item MATCHES "\\.in$")
|
list(REMOVE_ITEM files_list "${_current_item}")
|
||||||
#message(STATUS "removing .in file ${_current_item}")
|
endif()
|
||||||
list(REMOVE_ITEM files_list "${_current_item}")
|
endforeach()
|
||||||
endif()
|
|
||||||
if(_current_item MATCHES "\\.py$")
|
|
||||||
list(REMOVE_ITEM files_list "${_current_item}")
|
|
||||||
list(APPEND program_list "${_current_item}")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -97,6 +96,7 @@ lyx_install(${TOP_SRC_DIR}/lib kbd * .)
|
|||||||
lyx_install(${TOP_SRC_DIR}/lib layouts * .)
|
lyx_install(${TOP_SRC_DIR}/lib layouts * .)
|
||||||
lyx_install(${TOP_SRC_DIR}/lib lyx2lyx *.py .)
|
lyx_install(${TOP_SRC_DIR}/lib lyx2lyx *.py .)
|
||||||
lyx_install(${TOP_SRC_DIR}/lib scripts *.py .)
|
lyx_install(${TOP_SRC_DIR}/lib scripts *.py .)
|
||||||
|
lyx_install(${TOP_SRC_DIR}/lib . *.py .)
|
||||||
lyx_install(${TOP_SRC_DIR}/lib scripts *.R .)
|
lyx_install(${TOP_SRC_DIR}/lib scripts *.R .)
|
||||||
lyx_install(${TOP_SRC_DIR}/lib templates * . springer)
|
lyx_install(${TOP_SRC_DIR}/lib templates * . springer)
|
||||||
lyx_install(${TOP_SRC_DIR}/lib tex * .)
|
lyx_install(${TOP_SRC_DIR}/lib tex * .)
|
||||||
|
Loading…
Reference in New Issue
Block a user