lyx_mirror/development/cmake/po/CMakeLists.txt

121 lines
4.8 KiB
CMake
Raw Normal View History

Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
# 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, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
#
project(po)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
include_directories(${TOP_SRC_DIR}/po)
SET(_lyxname ${PACKAGE})
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
SET(_py_sources)
macro(add_gettext_python _par _dir)
set(_sources)
foreach(_arg ${ARGN})
file(GLOB _s1 ${TOP_SRC_DIR}/${_dir}/${_arg})
list(SORT _s1)
list(APPEND _sources ${_s1})
endforeach(_arg)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
SET(_dst "${CMAKE_CURRENT_BINARY_DIR}/${_par}_l10n.pot")
SET(_tmp_src_files "${CMAKE_CURRENT_BINARY_DIR}/${_par}_tmp_files")
SET(_src_files "${CMAKE_CURRENT_BINARY_DIR}/${_par}_files")
file(WRITE ${_tmp_src_files} "")
foreach(_s ${_sources})
FILE(APPEND ${_tmp_src_files} "${_s}\n")
endforeach()
if(${_par} MATCHES "^\(.*\)_[0-9]+$")
set(_par1 ${CMAKE_MATCH_1})
else()
set(_par1 ${_par})
endif()
ADD_CUSTOM_COMMAND(
OUTPUT ${_src_files}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_tmp_src_files} ${_src_files}
DEPENDS ${_tmp_src_files}
)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
COMMAND ${_PYTHON_EXECUTABLE}
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par1} "--src_file=${_src_files}"
DEPENDS ${_sources} ${_src_files}
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
)
SET_SOURCE_FILES_PROPERTIES("${_dst}" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${_src_files}" GENERATED)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
LIST(APPEND _py_sources "${_dst}")
endmacro(add_gettext_python)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot" GENERATED)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
add_gettext_python(qt4 src/frontends/qt4/ui *.ui)
add_gettext_python(layouts lib/layouts *.layout *.inc *.module)
add_gettext_python(languages lib languages)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
add_gettext_python(encodings lib encodings)
add_gettext_python(ui lib/ui *.ui *.inc)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
add_gettext_python(external lib external_templates)
add_gettext_python(formats lib configure.py)
FIND_PROGRAM(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
FIND_PROGRAM(GETTEXT_MSGUNIQ_EXECUTABLE msguniq)
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
COMMAND ${_PYTHON_EXECUTABLE}
ARGS "${CMAKE_SOURCE_DIR}/po/cat.py" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
DEPENDS ${_py_sources}
)
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot"
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
COMMAND ${GETTEXT_MSGUNIQ_EXECUTABLE}
ARGS -o "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
)
SET(_potfiles_dep)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "")
file(GLOB_RECURSE _tmp_potfiles RELATIVE ${TOP_SRC_DIR}/ ${TOP_SRC_DIR}/src/*.h ${TOP_SRC_DIR}/src/*.cpp ${TOP_SRC_DIR}/src/*.cpp.in)
list(SORT _tmp_potfiles)
list(REMOVE_ITEM _tmp_potfiles src/support/Package.cpp)
foreach(_f ${_tmp_potfiles})
# we don't need to select only relevant files because the outcome of xgettext
# will stay the same.
# Relevant files are files containing the string '_(".*")'
LIST(APPEND _potfiles_dep "${TOP_SRC_DIR}/${_f}")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "${_f}\n")
endforeach(_f)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE}
ARGS --default-domain=${_lyxname} --directory=${TOP_SRC_DIR} --add-comments=TRANSLATORS: --language=C++ --join-existing --keyword=_ --keyword=N_ --keyword=B_ --keyword=qt_ --files-from="${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in" --copyright-holder="LyX Developers" --msgid-bugs-address=lyx-devel@lists.lyx.org -o "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" ${_potfiles_dep}
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
)
#
# We have to copy the po-files first,
# otherwise they would be modified (inside the macro GETTEXT_CREATE_TRANSLATIONS())
# This makes the "svn up" on po-files work again
file(GLOB LYX_BASE_PO_FILES RELATIVE ${TOP_SRC_DIR}/po ${TOP_SRC_DIR}/po/*.po)
set(LYX_PO_FILES)
foreach(_pofile ${LYX_BASE_PO_FILES})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_SRC_DIR}/po/${_pofile} ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
DEPENDS ${TOP_SRC_DIR}/po/${_pofile}
)
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
endforeach(_pofile)
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ALL ${LYX_PO_FILES})
Kornel's cmake install changes: New files: Directories: development/cmake/po development/cmake/man Files: development/cmake/po/CMakeLists.txt Creates lyx.pot and *.gmo-files; Installs ${_lang} as ${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES/lyx.mo development/cmake/man/CMakeLists.txt Handling of lyx-manuals. development/cmake/modules/FindLyXGettext.cmake Original: (GNU) FindGettext.cmake Changed the installation subdirectory of .gmo-files. Previously installing into "/usr/local/share/lyx2.0" led to e.g. /usr/local/share/lyx2.0/share/locale/de/LC_MESSAGES/lyx.mo now /usr/local/share/lyx2.0/locale/de/LC_MESSAGES/lyx.mo Changes: development/cmake/Install.cmake macro lyx_install _parent_src_dir searches now through directories specified as simple regular expression. Until now we had to specify explicitly each directory for each language. Mode of the DESTINATION/lyx2lyx is now corect Installation of the .gmo files development/cmake/config.h.cmake: Changed some #cmakedefine to #define, because config_file() did not substitute the desired values in config.h. Some typos corrected (TOP_SRCDIR -> TOP_SRC_DIR) development/cmake/configCompiler.h.cmake Removed doubly defined ENABLE_NLS, HAVE_LC_MESSAGES Installation directory still hardcoded, users need to to set environment variable LYX_LOCALEDIR to get the corect translations. development/cmake/CMakeLists.txt Setting correct values to LYX_ABS_INSTALLED_DATADIR, LYX_ABS_INSTALLED_LOCALEDIR, LYX_ABS_TOP_SRCDIR. Now the lyx-executable searches on the installed places for it's data, so no need to set environment anymore. New variable: LYX_LOCALEDIR. We need it later in FindLyXGettext.cmake, because we cannot use the absolute path LYX_ABS_INSTALLED_LOCALEDIR. (We need relative path when packaging to different root-directory). Use of module FindLyXGettext.cmake: This is a modified version of (GNU) FindGettext.cmake Include the new development/cmake/po directory Include the new development/cmake/man directory development/cmake/po/CMakeLists.txt Creation of lyx.pot and apropriate .gmo files Creating lyx.pot file I had to use perl to simulate the unix "cat" command. Maybe Jose can write the corect statement in python git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-28 13:35:29 +00:00
# ADD_POFILES("lyx")