FindIconv.cmake   FindIconv.cmake 
# - Try to find Iconv # - Try to find Iconv
# Once done this will define # Once done this will define
# #
# ICONV_FOUND - system has Iconv # ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory # ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv # ICONV_LIBRARIES - Link these to use Iconv
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is cons t # ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is cons t
# #
# As of 7/27/2012 the version of libiconv.2.dyld in /usr/lib is incompatibl
e with libintl.8.dylib in /opt/local/lib
# HINTS are used before looking in the usual places...
include(CheckCXXSourceCompiles) include(CheckCXXSourceCompiles)
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
# Already in cache, be silent # Already in cache, be silent
SET(ICONV_FIND_QUIETLY TRUE) SET(ICONV_FIND_QUIETLY TRUE)
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h IF(APPLE)
/usr/include FIND_PATH(ICONV_INCLUDE_DIR iconv.h
/usr/local/include HINTS
) /opt/local/include
/sw/include
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv c )
PATHS ELSE(NOT APPLE)
/usr/lib/ FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
/usr/local/lib ENDIF(APPLE)
)
IF(APPLE)
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv
HINTS
/opt/local/lib
/sw/include
)
ELSE(NOT APPLE)
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv c)
ENDIF(APPLE)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE) SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
IF(ICONV_FOUND) IF(ICONV_FOUND)
check_cxx_source_compiles(" check_cxx_source_compiles("
#include <iconv.h> #include <iconv.h>
 End of changes. 2 change blocks. 
10 lines changed or deleted 23 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/