diff options
author | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-02-11 19:20:50 +0100 |
---|---|---|
committer | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2013-02-11 19:20:50 +0100 |
commit | 2f8d4e37f5dffe7f5b8d28a21d785b37d6e09e0f (patch) | |
tree | 00da7d6b5f5370aa4c432f34d45014ab9faf1858 /CMakeLists.txt | |
parent | 1eade34854d9bfa858ffd2aa44cd1f5baf5951f8 (diff) | |
download | gawk-2f8d4e37f5dffe7f5b8d28a21d785b37d6e09e0f.tar.gz |
Add ENABLE_NLS if all necessary packages can be found.Build translations. Copied po/CMakeLists.txt from Stellarium project at http://sourceforge.net/projects/stellarium/. This works somehow with some changes.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d76f834f..7dbe993a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,9 +126,19 @@ DefineHFileIfAvailable(stdlib.h HAVE_STDLIB_H) DefineHFileIfAvailable(unistd.h HAVE_UNISTD_H) DefineFunctionIfAvailable(gettext HAVE_GETTEXT) DefineFunctionIfAvailable(dcgettext HAVE_DCGETTEXT) + FIND_PACKAGE(Gettext REQUIRED) +# FIND_PACKAGE(XGettext REQUIRED) +# FIND_PACKAGE(Iconv REQUIRED) + FIND_PATH(INTL_INCLUDE_DIR libintl.h PATHS /usr/include /usr/local/include) + FIND_LIBRARY(INTL_LIBRARIES intl c PATHS /usr/lib/ /usr/local/lib) DefineSymbolIfAvailable("CODESET" "langinfo.h" HAVE_LANGINFO_CODESET) DefineSymbolIfAvailable("LC_MESSAGES" "locale.h" HAVE_LC_MESSAGES) DefineTypeIfAvailable("_Bool" HAVE__BOOL) +if (${HAVE_GETTEXT} AND ${HAVE_DCGETTEXT} AND ${HAVE_LANGINFO_CODESET} AND ${HAVE_LC_MESSAGES}) + add_definitions(-D LOCALEDIR=\\"/usr/share/locale\\") + add_definitions(-D ENABLE_NLS) + ADD_SUBDIRECTORY( po ) +endif() DefineHFileIfAvailable(stdbool.h HAVE_STDBOOL_H) DefineHFileIfAvailable(sys/wait.h HAVE_SYS_WAIT_H) DefineHFileIfAvailable(arpa/inet.h HAVE_ARPA_INET_H) @@ -261,7 +271,6 @@ endif() set (GAWK_SOURCES ${GAWK_SOURCES} array.c - awkgram.c builtin.c cint_array.c command.c |