Commit Graph

25 Commits

Author SHA1 Message Date
Roger Leigh c5e797dbb8 FindIntl: New module to find Gettext libintl
Add support for Sun/Uniforum/GNU gettext libintl.  This belongs in CMake
rather than upstream because:

* There are multiple upstreams (Sun, GNU).

* It may or may not be in the glibc C library depending
  upon the platform and build options used.

Although we already have a FindGettext module, that is for the tools.
This module is for the library, and is independent because it's
perfectly OK to use libintl without the gettext tools (and vice versa),
and they might not all be found.  Add cross references between the two
modules in notes to make the relationship clearer.
2014-11-11 13:02:16 -05:00
Brad King 20c5f4fbd9 Modules: Wrap long lines in pre-formatted documentation blocks
Help format the blocks better for display without a wide screen.
2014-11-06 14:52:26 -05:00
Brad King 405b92d031 Merge topic 'FindGettext-doc-update'
3919f254 FindGettext: Fix name of GETTEXT_PROCESS_POT_FILE in docs (#15162)
2014-09-22 09:13:14 -04:00
Brad King 3919f254e8 FindGettext: Fix name of GETTEXT_PROCESS_POT_FILE in docs (#15162)
Rename GETTEXT_PROCESS_POT to GETTEXT_PROCESS_POT_FILE.

Patch-by: maahnat@gmail.com
2014-09-18 09:39:49 -04:00
Rolf Eike Beer 2622bc3f65 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
2014-04-14 18:16:58 +02:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Rolf Eike Beer a7be253418 FindGettext: fix overwriting result with empty variable (#13691)
Remove stray line left by commit 656ab19b (FindGettext: remove code
duplicating FPHSA checks, 2012-09-08).
2012-11-26 08:57:13 -05:00
Brad King 13c36fac62 Merge topic 'include-FPHSA'
ff0d1a8 include FPHSA from current directory in all modules
2012-09-11 15:01:41 -04:00
Rolf Eike Beer ff0d1a8d84 include FPHSA from current directory in all modules 2012-09-09 00:39:47 +02:00
Rolf Eike Beer 656ab19b5c FindGettext: remove code duplicating FPHSA checks 2012-09-08 19:06:44 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Alex Neundorf 3b48822803 FindGetText: fix multiple targets with the same name problem (CMP0002)
The functions in FindGettext create a custom target. If the functions
are called multiple times, multiple times the same target is created.
This works only if CMP0002 is set to OLD.
With this patch there is only one central target created, and each
invocation of the function creates a target with a unique name and
make the central target depend on this one.

Alex
2012-02-12 18:57:28 +01:00
Rolf Eike Beer 77e6c6fe84 FindGettext: support version selection 2012-01-25 18:02:50 +01:00
Alex Neundorf 65dde30ddd FindGettext: two more fixes for files with multiple dots
Another patch by Albert Astals Cid for dealing with translation files
with multiple dots.

Alex
2011-11-16 20:53:59 +01:00
Alex Neundorf e48fcfffa3 -make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots
Patch by Albert Astals Cid.
E.g. plasma_package_org.kde.activityswitcher.po will now be installed
correctly as plasma_package_org.kde.activityswitcher.mo, and not as
plasma_package_org.mo.

This is kind-of related to #12282

Alex
2011-11-15 18:49:47 +01:00
Alex Neundorf ecb4459e31 Strip trailing whitespace
Alex
2011-11-15 18:48:38 +01:00
Alex Neundorf bebb2bcd23 Support REQUIRED in FindGettext.cmake (using FPHSA.cmake)
Alex
2011-08-10 02:35:58 +02:00
Alex Neundorf 431c8eb44c Add macros GETTEXT_PROCESS_POT() and GETTEXT_PROCESS_PO_FILES()
These macros (functions actually) can be used to process pot and
po files. Patch prepared by Raphael Kubo da Costa.

Alex
2011-08-10 02:28:26 +02:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Alexander Neundorf b4956a574a BUG: fix #8122, _firstPoFile was not empty because it was no real variable
but just a macro argument -> make it a real variable

Alex
2009-01-10 08:39:35 -05:00
Alexander Neundorf 0a012cc428 BUG: fix 7230: don't ignore first parameter if it's not ALL
Alex
2008-06-29 18:58:50 -04:00
Alexander Neundorf 20d75ac237 BUG: fix typo reported by Duncan Mac Vicar
Alex
2007-02-25 19:22:59 -05:00
Alexander Neundorf 2d4bc73d39 BUG: add gettext module for working with GNU gettext (#4081)
Alex
2007-02-02 12:46:52 -05:00