From: Kornel Benko Date: Sun, 30 Aug 2020 18:30:21 +0000 (+0200) Subject: Cmake build: Install lyx fonts in system dir too on linux X-Git-Tag: lyx-2.4.0dev-acb2ca7b~245 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=46fca4dc1d3298bfbfa41c1ad2233116d176610e;p=features.git Cmake build: Install lyx fonts in system dir too on linux 1.) Math-editor seems to use system fonts, so install it there. 2.) We use fonts from the support-dir, so install them there too. This is something automake may take int account too. --- diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index bdeea93e0b..befe55681f 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -24,7 +24,8 @@ macro(lyx_install _what _parent_src_dir _gl_dir _file_type) if(NOT _dirs) set(_dirs .) endif() - # Select installation dir + # Select installation dir(s) + # Mark, that _dest_subdir may be a list if ("${_what}" STREQUAL "data") get_data_destination(_dest_subdir) elseif ("${_what}" STREQUAL "font") @@ -78,8 +79,10 @@ macro(lyx_install _what _parent_src_dir _gl_dir _file_type) set(_base_dir .) endif() - install(FILES ${files_list} DESTINATION "${_dest_subdir}${_dir}/${_base_dir}") - #message(STATUS "Installing ${files_list} to ${_dest_subdir}${_dir}/${_base_dir}") + foreach(_dst ${_dest_subdir}) + install(FILES ${files_list} DESTINATION "${_dst}${_dir}/${_base_dir}") + #message(STATUS "Installing ${files_list} to ${_dest_subdir}${_dir}/${_base_dir}") + endforeach() endif() if(program_list) if(_glob_dir STREQUAL ".") diff --git a/development/cmake/modules/LyXDestinations.cmake b/development/cmake/modules/LyXDestinations.cmake index b202271bd4..87de7a9c6a 100644 --- a/development/cmake/modules/LyXDestinations.cmake +++ b/development/cmake/modules/LyXDestinations.cmake @@ -68,7 +68,9 @@ function(get_font_destination _result) set(_dir "${LYX_DATA_SUBDIR}fonts/") elseif(UNIX) # at least on ubuntu - set(_dir "${LYX_DATA_SUBDIR}fonts/") + # ${LYX_DATA_SUBDIR}: Satisfy lyx because GuiFontLoader.cpp searches there + # share/fonts: because math-editor uses system font + set(_dir "${LYX_DATA_SUBDIR}fonts/" "share/fonts/${_lyx}/") else() message(FATAL_ERROR "Unhandled platform") endif()