From 34aee9dc819ead4b597175ff9262ba7bc6c276a6 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 15 Aug 2007 02:23:41 +0000 Subject: copy stuff from FindGettext.cmake, which actually searches libintl to a new FindLibintl.cmake Alex svn path=/trunk/KDE/kdelibs/; revision=700191 --- modules/FindLibintl.cmake | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/FindLibintl.cmake (limited to 'modules/FindLibintl.cmake') diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake new file mode 100644 index 00000000..3b444d4c --- /dev/null +++ b/modules/FindLibintl.cmake @@ -0,0 +1,50 @@ +# Try to find Gettext functionality +# Once done this will define +# +# GETTEXT_FOUND - system has Gettext +# GETTEXT_INCLUDE_DIR - Gettext include directory +# GETTEXT_LIBRARIES - Libraries needed to use Gettext +# +# HAVE_LIBINTL_H +# LIBC_HAS_DGETTEXT +# LIBINTL_HAS_DGETTEXT +# +# TODO: This will enable translations only if Gettext functionality is +# present in libc. Must have more robust system for release, where Gettext +# functionality can also reside in standalone Gettext library, or the one +# embedded within kdelibs (cf. gettext.m4 from Gettext source). +# +# Copyright (c) 2006, Chusslove Illich, +# Copyright (c) 2007, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) + set(Libintl_FIND_QUIETLY TRUE) +endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) + +find_path(LIBINTL_INCLUDE_DIR libintl.h) + +set(LIBINTL_LIB_FOUND FALSE) + +if(LIBINTL_INCLUDE_DIR) + include(CheckFunctionExists) + check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) + + if (LIBINTL_LIBC_HAS_DGETTEXT) + set(LIBINTL_LIBRARIES) + set(LIBINTL_LIB_FOUND TRUE CACHE BOOL "Libintl found" FORCE) + else (LIBINTL_LIBC_HAS_DGETTEXT) + find_library(LIBINTL_LIBRARIES NAMES intl libintl ) + if(LIBINTL_LIBRARIES) + set(LIBINTL_LIB_FOUND TRUE CACHE BOOL "Libintl found" FORCE) + endif(LIBINTL_LIBRARIES) + endif (LIBINTL_LIBC_HAS_DGETTEXT) + +endif(LIBINTL_INCLUDE_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) + +mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT) -- cgit v1.2.1 From c47e6423b497b2f51b0fda36fbae524b3efa61fb Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 15 Aug 2007 03:03:19 +0000 Subject: use FindLibintl.cmake instead of FindGettext.cmake in kdelibs Alex svn path=/trunk/KDE/kdelibs/; revision=700195 --- modules/FindLibintl.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'modules/FindLibintl.cmake') diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake index 3b444d4c..e4d0539e 100644 --- a/modules/FindLibintl.cmake +++ b/modules/FindLibintl.cmake @@ -1,13 +1,9 @@ -# Try to find Gettext functionality +# Try to find Libintl functionality # Once done this will define # -# GETTEXT_FOUND - system has Gettext -# GETTEXT_INCLUDE_DIR - Gettext include directory -# GETTEXT_LIBRARIES - Libraries needed to use Gettext -# -# HAVE_LIBINTL_H -# LIBC_HAS_DGETTEXT -# LIBINTL_HAS_DGETTEXT +# LIBINTL_FOUND - system has Libintl +# LIBINTL_INCLUDE_DIR - Libintl include directory +# LIBINTL_LIBRARIES - Libraries needed to use Libintl # # TODO: This will enable translations only if Gettext functionality is # present in libc. Must have more robust system for release, where Gettext -- cgit v1.2.1 From 814455b7ad321c88e730662fda58261087b72e72 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 18 Feb 2008 19:06:32 +0000 Subject: some improvements to the docs: -some modules were not at all documented, only few are left now -the copyright message doesn't have to be printed for every module in the docs -fix FindKorundom.cmake, it didn't follow the style guide and had typos (e.g. Korumdum_FOUND instead of KORUNDUM_FOUND) Alex (will commit modified FindKDE4Internal.cmake after Christians commit) svn path=/trunk/KDE/kdelibs/; revision=776742 --- modules/FindLibintl.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindLibintl.cmake') diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake index e4d0539e..b421ca85 100644 --- a/modules/FindLibintl.cmake +++ b/modules/FindLibintl.cmake @@ -9,7 +9,7 @@ # present in libc. Must have more robust system for release, where Gettext # functionality can also reside in standalone Gettext library, or the one # embedded within kdelibs (cf. gettext.m4 from Gettext source). -# + # Copyright (c) 2006, Chusslove Illich, # Copyright (c) 2007, Alexander Neundorf, # -- cgit v1.2.1 From 9197e55392ed66b784cb719e202a24f78cd03c58 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 3 Apr 2008 22:12:21 +0000 Subject: -mark some variables as advanced, so they don't appear in the not-advanced view of cmake-gui and ccmake -some minor cosmetics (casing and spaces vs. tabs) Alex svn path=/trunk/KDE/kdelibs/; revision=793410 --- modules/FindLibintl.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindLibintl.cmake') diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake index b421ca85..1ddcbd82 100644 --- a/modules/FindLibintl.cmake +++ b/modules/FindLibintl.cmake @@ -43,4 +43,4 @@ endif(LIBINTL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) -mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT) +mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND) -- cgit v1.2.1 From 9215cdab458b5fdc16343157dacd78ef82245ae1 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 16 Apr 2008 20:37:25 +0000 Subject: don't put set variables into the CACHE, per Brad King svn path=/trunk/KDE/kdelibs/; revision=797757 --- modules/FindLibintl.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindLibintl.cmake') diff --git a/modules/FindLibintl.cmake b/modules/FindLibintl.cmake index 1ddcbd82..52ae6479 100644 --- a/modules/FindLibintl.cmake +++ b/modules/FindLibintl.cmake @@ -30,11 +30,11 @@ if(LIBINTL_INCLUDE_DIR) if (LIBINTL_LIBC_HAS_DGETTEXT) set(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE CACHE BOOL "Libintl found" FORCE) + set(LIBINTL_LIB_FOUND TRUE) else (LIBINTL_LIBC_HAS_DGETTEXT) find_library(LIBINTL_LIBRARIES NAMES intl libintl ) if(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE CACHE BOOL "Libintl found" FORCE) + set(LIBINTL_LIB_FOUND TRUE) endif(LIBINTL_LIBRARIES) endif (LIBINTL_LIBC_HAS_DGETTEXT) -- cgit v1.2.1