From dde12565e76ee45d53519d58f88a0ffba668b705 Mon Sep 17 00:00:00 2001 From: Julien Louis Date: Sat, 26 May 2007 19:15:46 +0000 Subject: Fix libintl.h issue on FreeBSD --- cmake/FindGettext.cmake | 9 ++++++++- cmake/FindIconv.cmake | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/FindGettext.cmake b/cmake/FindGettext.cmake index 6cc6170ce..c5c1cf541 100644 --- a/cmake/FindGettext.cmake +++ b/cmake/FindGettext.cmake @@ -32,6 +32,13 @@ INCLUDE(CheckIncludeFiles) INCLUDE(CheckLibraryExists) INCLUDE(CheckFunctionExists) +FIND_PATH(LIBINTL_INCLUDE + NAMES libintl.h + PATH /usr/local/include /usr/pkg/include /usr/include +) + +SET(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE}) + CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H) IF(HAVE_LIBINTL_H) @@ -41,8 +48,8 @@ IF(HAVE_LIBINTL_H) ELSE(LIBC_HAS_DGETTEXT) FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl libintl PATHS - /usr/lib /usr/local/lib + /usr/lib ) IF(LIBINTL_LIBRARY) CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT) diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake index 5efbec59d..2fe0d9a12 100644 --- a/cmake/FindIconv.cmake +++ b/cmake/FindIconv.cmake @@ -54,6 +54,12 @@ IF(ICONV_INCLUDE_PATH) ENDIF(ICONV_INCLUDE_PATH) include(CheckCSourceCompiles) + +IF(ICONV_LIBRARY) + SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH}) +ENDIF(ICONV_LIBRARY) + SET(CMAKE_REQUIRED_FLAGS -Werror) check_c_source_compiles(" #include -- cgit v1.2.3