]> git.lyx.org Git - features.git/commitdiff
Cmake build: Install lyx fonts in system dir too on linux
authorKornel Benko <kornel@lyx.org>
Sun, 30 Aug 2020 18:30:21 +0000 (20:30 +0200)
committerKornel Benko <kornel@lyx.org>
Sun, 30 Aug 2020 18:30:21 +0000 (20:30 +0200)
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.

development/cmake/Install.cmake
development/cmake/modules/LyXDestinations.cmake

index bdeea93e0bf71a1126eaf005043e5d66312d978d..befe55681ffa1898ed3803a9d1e9b5a07caff097 100755 (executable)
@@ -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 ".")
index b202271bd486a465f055e45323ca8b092c7ce369..87de7a9c6aaae25d40ac3e4f64d912b8912a8fe6 100644 (file)
@@ -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()