diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 9b204b32dc..b0b6850e4b 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -2,8 +2,9 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. # -# Copyright (c) 2006, Peter Kümmel, -# +# Copyright (c) 2006-2010 Peter Kümmel, +# Copyright (c) 2008-2010 Kornel Benko, + cmake_minimum_required(VERSION 2.4) @@ -97,6 +98,12 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) endif() endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +if (WIN32) + set(DATA_SUBDIR "Resources/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) +else() + set(DATA_SUBDIR "" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) +endif() + set(LYX_ABS_INSTALLED_DATADIR "${CMAKE_INSTALL_PREFIX}") set(LYX_LOCALEDIR "locale") set(LYX_ABS_INSTALLED_LOCALEDIR "${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}") diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index 908ecd2565..8be0392d5a 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -43,9 +43,9 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type) if(_glob_dir STREQUAL ".") set(_base_dir .) endif() - #message(STATUS "install ${_dir}/${_base_dir}: ${files_list} ") - #message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${_dir}/${_base_dir}") - install(FILES ${files_list} DESTINATION ${_dir}/${_base_dir}) + #message(STATUS "install ${DATA_SUBDIR}${_dir}/${_base_dir}: ${files_list} ") + #message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${DATA_SUBDIR}${_dir}/${_base_dir}") + install(FILES ${files_list} DESTINATION ${DATA_SUBDIR}${_dir}/${_base_dir}) endif() endforeach(_current_dir) endforeach(_glob_dir) diff --git a/development/cmake/doc/CMakeLists.txt b/development/cmake/doc/CMakeLists.txt index cb7f90c9ef..ea30b1f077 100644 --- a/development/cmake/doc/CMakeLists.txt +++ b/development/cmake/doc/CMakeLists.txt @@ -1,8 +1,8 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. # -# Copyright (c) 2008, 2009 Peter Kümmel, -# Copyright (c) 2008, 2009 Kornel Benko, +# Copyright (c) 2008-2010 Peter Kümmel, +# Copyright (c) 2008-2010 Kornel Benko, # project(doc) @@ -32,7 +32,7 @@ foreach(_rel_doc ${_rel_lyx_docs}) COMMAND perl "${CMAKE_SOURCE_DIR}/doc/ReplaceValues.pl" "LYX_USERDIR_VER=${LYX_USERDIR_VER}" "LYX_DIR_VER=${LYX_DIR_VER}" "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" > "${_created_doc}" DEPENDS "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" ) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}" DESTINATION "doc/${_rel_dir_part}") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}" DESTINATION "${DATA_SUBDIR}doc/${_rel_dir_part}") LIST(APPEND _docs "${_created_doc}") endforeach(_rel_doc) diff --git a/development/cmake/lyx2lyx/CMakeLists.txt b/development/cmake/lyx2lyx/CMakeLists.txt index 0240cf085b..61b5706adc 100644 --- a/development/cmake/lyx2lyx/CMakeLists.txt +++ b/development/cmake/lyx2lyx/CMakeLists.txt @@ -1,17 +1,17 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. # -# Copyright (c) 2008, 2009 Peter Kümmel, -# Copyright (c) 2008, 2009 Kornel Benko, +# Copyright (c) 2008-2010 Peter Kümmel, +# Copyright (c) 2008-2010 Kornel Benko, # configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION lyx2lyx) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION ${DATA_SUBDIR}lyx2lyx) if (UNIX) set(_project "lyx2lyx") include(../PyCompile) endif() -install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION lyx2lyx) +install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION ${DATA_SUBDIR}lyx2lyx) diff --git a/development/cmake/man/CMakeLists.txt b/development/cmake/man/CMakeLists.txt index 95f12a730d..1fad6676db 100755 --- a/development/cmake/man/CMakeLists.txt +++ b/development/cmake/man/CMakeLists.txt @@ -1,8 +1,8 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. # -# Copyright (c) 2008, 2009 Peter Kümmel, -# Copyright (c) 2008, 2009 Kornel Benko, +# Copyright (c) 2008-2010 Peter Kümmel, +# Copyright (c) 2008-2010 Kornel Benko, # project(man) @@ -26,7 +26,7 @@ endforeach(_mn) ADD_CUSTOM_TARGET(man ALL DEPENDS ${_manuals}) -install(FILES ${_manuals} DESTINATION man/man1) +install(FILES ${_manuals} DESTINATION ${DATA_SUBDIR}man/man1) # ADD_MANUALS("lyx")