From 96a39d352efa62c1ab64cf412b1893288b970b97 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 22 Mar 2006 00:10:50 +0000 Subject: Works better this way (still for Mac OS X). OK, on Linux it comes from glibc. So instead of always looking for a libintl, maybe we should first check do a "check if this call links without linking to anything else than the libc"... svn path=/trunk/KDE/kdelibs/; revision=521239 --- modules/FindGettext.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/FindGettext.cmake b/modules/FindGettext.cmake index be931d80..8b3b078d 100644 --- a/modules/FindGettext.cmake +++ b/modules/FindGettext.cmake @@ -21,13 +21,17 @@ if (HAVE_LIBINTL_H) set(GETTEXT_SOURCE "built in libc (libintl.h present)") endif (HAVE_LIBINTL_H) -# Check for libintl, and check that it provides libintl_dgettext. +# Check for libintl, and check that it provides libintl_dgettext. Needed on BSD systems (e.g. Mac OS X) FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl libintl PATHS /usr/lib /usr/local/lib ) -CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "libintl_dgettext" "" GETTEXT_LIBRARIES) +CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "libintl_dgettext" "" LIBINTL_HAS_DGETTEXT) +if (LIBINTL_HAS_DGETTEXT) + set(GETTEXT_SOURCE "in ${LIBINTL_LIBRARY}") + set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY}) +endif (LIBINTL_HAS_DGETTEXT) if (GETTEXT_FOUND) if (NOT Gettext_FIND_QUIETLY) -- cgit v1.2.1