X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2FInstall.cmake;h=a345d3b864985d850c3add92f77969df52ca51dc;hb=3419fa6a9e0ff3542c8118a34eab67593bd8d895;hp=1c998d1540ecade1aa287a28632aa9f81168829f;hpb=ff0c95aba639ab35a71f5d8ee347ecefbb9e71e1;p=lyx.git diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index 1c998d1540..a345d3b864 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -14,7 +14,7 @@ endif() # Here we try to exclude files which we do not want to install # Depending on _what, installation on UNIX goes to # data -> ${LYX_DATA_SUBDIR} -# font -> share/fonts/truetype/${_lyx}/ +# font -> share/${_lyx}/fonts/ # bin -> bin # tex -> share/texmf/tex/latex/${_lyx}/ macro(lyx_install _what _parent_src_dir _gl_dir _file_type) @@ -47,28 +47,32 @@ macro(lyx_install _what _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) + set(program_list) foreach(_current_item ${_item_list}) - if(files_list) - if(IS_DIRECTORY ${_current_item}) - #message(STATUS "removing dir ${_current_item}") + if(files_list) + if(IS_DIRECTORY ${_current_item}) + #message(STATUS "removing dir ${_current_item}") list(REMOVE_ITEM files_list "${_current_item}") else() - if ("${_file_type}" STREQUAL "*") - foreach(_mask "/\\.[^/]+$" "\\.in$" "\\.py$" "\\.patch$" "CMakeLists\\.txt$" "\\.lyx~$") - if(_current_item MATCHES ${_mask}) - #message(STATUS "removing item ${_current_item}") - list(REMOVE_ITEM files_list "${_current_item}") - endif() - endforeach() - endif() - endif() + if ("${_file_type}" STREQUAL "*") + foreach(_mask "/\\.[^/]+$" "\\.in$" "\\.py$" "\\.patch$" "CMakeLists\\.txt$" "\\.lyx~$") + if(_current_item MATCHES ${_mask}) + #message(STATUS "removing item ${_current_item}") + list(REMOVE_ITEM files_list "${_current_item}") + endif() + endforeach() + endif() + endif() endif() endforeach(_current_item) if(files_list) 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") + if (NOT WIN32) + # subscript.sty is installed only for MikTeX since it is part of texlive + list(REMOVE_ITEM files_list "${_current_dir}/subscript.sty") + endif() GET_FILENAME_COMPONENT(_base_dir ${_current_dir} NAME) if(_glob_dir STREQUAL ".") set(_base_dir .) @@ -77,12 +81,12 @@ macro(lyx_install _what _parent_src_dir _gl_dir _file_type) install(FILES ${files_list} DESTINATION "${_dest_subdir}${_dir}/${_base_dir}") #message(STATUS "Installing ${files_list} to ${_dest_subdir}${_dir}/${_base_dir}") endif() - if(program_list) - if(_glob_dir STREQUAL ".") - set(_base_dir .) - endif() + if(program_list) + if(_glob_dir STREQUAL ".") + set(_base_dir .) + endif() install(FILES ${program_list} DESTINATION "${_dest_subdir}${_dir}/${_base_dir}") - endif() + endif() endforeach(_current_dir) endforeach(_glob_dir) endforeach(_dir) @@ -112,9 +116,11 @@ lyx_install("data" ${TOP_SRC_DIR}/lib kbd * .) lyx_install("data" ${TOP_SRC_DIR}/lib layouts * .) lyx_install("data" ${TOP_SRC_DIR}/lib lyx2lyx *.py .) lyx_install("data" ${TOP_SRC_DIR}/lib scripts *.py .) +lyx_install("data" ${TOP_SRC_DIR}/lib citeengines *.citeengine .) lyx_install("data" ${TOP_SRC_DIR}/lib . *.py .) lyx_install("data" ${TOP_SRC_DIR}/lib scripts *.R .) lyx_install("data" ${TOP_SRC_DIR}/lib templates * . springer) +lyx_install("data" ${TOP_SRC_DIR}/lib xtemplates *.xtemplate .) lyx_install("tex" ${TOP_SRC_DIR}/lib/tex . * .) lyx_install("data" ${TOP_SRC_DIR}/lib ui * .) lyx_install("data" ${TOP_SRC_DIR}/lib . * .) @@ -126,14 +132,20 @@ if(APPLE) install(FILES "${TOP_SRC_DIR}/development/MacOSX/PkgInfo" DESTINATION "${MACOSX_BUNDLE_STARTUP_COMMAND}/Contents") endif() - install(FILES "${TOP_SRC_DIR}/development/MacOSX/lyxeditor" DESTINATION "${LYX_UTILITIES_INSTALL_PATH}") + foreach(_i lyxeditor maxima inkscape) + install(FILES "${TOP_SRC_DIR}/development/MacOSX/${_i}" DESTINATION "${LYX_UTILITIES_INSTALL_PATH}") + endforeach() install(FILES "${TOP_SRC_DIR}/development/MacOSX/LyX.icns" DESTINATION "${LYX_DATA_SUBDIR}") set(program_suffix ${PROGRAM_SUFFIX}) + configure_file("${TOP_SRC_DIR}/development/MacOSX/lyxrc.dist.in" lyxrc.dist) + lyx_install("data" ${CMAKE_CURRENT_BINARY_DIR} . lyxrc.dist .) elseif(UNIX) set(program_suffix ${PROGRAM_SUFFIX}) configure_file(${TOP_SRC_DIR}/lib/lyx.desktop.in lyx${PROGRAM_SUFFIX}.desktop) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx${PROGRAM_SUFFIX}.desktop DESTINATION ${SYSTEM_DATADIR}/applications) install(FILES ${TOP_SRC_DIR}/lib/images/lyx.svg RENAME lyx${PROGRAM_SUFFIX}.svg DESTINATION ${SYSTEM_DATADIR}/icons/hicolor/scalable/apps/) + configure_file(${TOP_SRC_DIR}/development/unix/lyxrc.dist.in lyxrc.dist) + lyx_install("data" ${CMAKE_CURRENT_BINARY_DIR} . lyxrc.dist .) endif() if(USE_POSIX_PACKAGING AND EXISTS "${TOP_SRC_DIR}/lib/usr.bin.lyxwrap.in")