]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/Install.cmake
Make package name be platform dependent
[lyx.git] / development / cmake / Install.cmake
index 5402d5bc42669f4afa65c1e6968fe04a89f5f2c4..2154bdc8e6f175eed0c4fdf587167fb30a2d1b32 100755 (executable)
@@ -27,6 +27,7 @@ macro(lyx_install _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)
         foreach(_current_item ${_item_list})
          if(files_list)
            if(IS_DIRECTORY ${_current_item})
@@ -41,6 +42,10 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
                #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)
@@ -56,6 +61,12 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
           #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)
@@ -77,7 +88,7 @@ lyx_install(${TOP_SRC_DIR}/lib doc/${_all_languages} *    clipart)
 
 lyx_install(${TOP_SRC_DIR}/lib examples     *      . ${_all_languages})
 lyx_install(${TOP_SRC_DIR}/lib fonts        *      .)
-lyx_install(${TOP_SRC_DIR}/lib images       *      . math commands attic classic oxygen)
+lyx_install(${TOP_SRC_DIR}/lib images       *      . math ipa commands attic classic oxygen)
 lyx_install(${TOP_SRC_DIR}/lib kbd          *      .)
 lyx_install(${TOP_SRC_DIR}/lib layouts      *      .)
 lyx_install(${TOP_SRC_DIR}/lib lyx2lyx      *.py   .)
@@ -88,6 +99,8 @@ lyx_install(${TOP_SRC_DIR}/lib tex          *      .)
 lyx_install(${TOP_SRC_DIR}/lib ui           *      .)
 lyx_install(${TOP_SRC_DIR}/lib .            *      .)
 
+install(PROGRAMS ${TOP_SRC_DIR}/lib/scripts/listerrors DESTINATION scripts)
+
 if(UNIX)
   set(program_suffix ${PROGRAM_SUFFIX})
   configure_file(${TOP_SRC_DIR}/lib/lyx.desktop.in lyx${PROGRAM_SUFFIX}.desktop)