diff options
author | Julien Louis <ptitlouis@sysif.net> | 2007-05-26 19:15:46 +0000 |
---|---|---|
committer | Julien Louis <ptitlouis@sysif.net> | 2007-05-26 19:15:46 +0000 |
commit | dde12565e76ee45d53519d58f88a0ffba668b705 (patch) | |
tree | 539f34d5ab44a1cb6959bbb83333ae2758ad96e4 /cmake | |
parent | 34e220df56c4e25343941c9cc80550f3aea0c724 (diff) | |
download | weechat-dde12565e76ee45d53519d58f88a0ffba668b705.zip |
Fix libintl.h issue on FreeBSD
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindGettext.cmake | 9 | ||||
-rw-r--r-- | cmake/FindIconv.cmake | 6 |
2 files changed, 14 insertions, 1 deletions
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 <iconv.h> |