]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/Install.cmake
server_monitor.h must be included last for msvc sake.
[lyx.git] / development / cmake / Install.cmake
index 6875f7efcd9e065a9400e7af9f189c882cd2ea3e..908ecd256530956dce4c59bf3ae621ee4f730973 100755 (executable)
@@ -8,6 +8,7 @@ message(STATUS "installing to ${CMAKE_INSTALL_PREFIX}, defined by CMAKE_INSTALL_
 # and installs the files in CMAKE_INSTALL_PREFIX/_current_dir
 # dir_item is on item of the remaining arguments
 macro(lyx_install _parent_src_dir _gl_dir _file_type)
+  #message("checking parents ${_parent_src_dir}")
   file(GLOB _dirs RELATIVE "${_parent_src_dir}" ${_parent_src_dir}/${_gl_dir})
   #cmake bug on Windows: if _gl_dir==. _dirs is empty but on linux _dirs==.
   if(NOT _dirs)
@@ -17,8 +18,10 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
     foreach(_glob_dir ${ARGN})
       file(GLOB _dir_list ${_parent_src_dir}/${_dir}/${_glob_dir})
       if(NOT _dir_list)
-        set(_dir_list ${_parent_src_dir}/${_dir})
-      endif() 
+        if(_glob_dir STREQUAL ".")
+          set(_dir_list ${_parent_src_dir}/${_dir}/.)
+        endif()
+      endif()
       #message(STATUS "${_dir}/${_glob_dir} -> ${_dir_list} ")
       foreach(_current_dir ${_dir_list})
         file(GLOB _item_list ${_current_dir}/${_file_type})
@@ -49,13 +52,14 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
   endforeach(_dir)
 endmacro(lyx_install)
 
+
 # language-specific-directories (like ca, de, es ...) are now globbed as "[a-z][a-z]"
 set(_all_languages "[a-z][a-z]")
 
 lyx_install(${TOP_SRC_DIR}/lib bind         *.bind   . ${_all_languages})
 lyx_install(${TOP_SRC_DIR}/lib commands     *.def    .)
 
-# this is handled in doc/CMakefile.txt
+# this is handled in doc/CMakeLists.txt
 #lyx_install(${TOP_SRC_DIR}/lib doc          *.lyx    . ${_all_languages})
 #lyx_install(${TOP_SRC_DIR}/lib doc          *.txt    . ${_all_languages})
 lyx_install(${TOP_SRC_DIR}/lib doc          *      biblio clipart)
@@ -67,12 +71,10 @@ lyx_install(${TOP_SRC_DIR}/lib fonts        *      .)
 lyx_install(${TOP_SRC_DIR}/lib images       *      . math commands attic)
 lyx_install(${TOP_SRC_DIR}/lib kbd          *      .)
 lyx_install(${TOP_SRC_DIR}/lib layouts      *      .)
-lyx_install(${TOP_SRC_DIR}/lib lyx2lyx      *      .)
-lyx_install(${TOP_SRC_DIR}/lib scripts      *      .)
+lyx_install(${TOP_SRC_DIR}/lib lyx2lyx      *.py   .)
+lyx_install(${TOP_SRC_DIR}/lib scripts      *.py   .)
 lyx_install(${TOP_SRC_DIR}/lib templates    *      .)
 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/lyx2lyx/lyx2lyx DESTINATION lyx2lyx)
-