Handle HAVE_ICONV variable in the new cmake file

v0.27.3
Luis Diaz Mas 8 years ago
parent 147523f132
commit 8e103d23f2

@ -71,17 +71,10 @@ IF( EXIV2_ENABLE_COMMERCIAL )
ADD_DEFINITIONS( -DEXV_COMMERCIAL_VERSION )
ENDIF( EXIV2_ENABLE_COMMERCIAL )
IF( ICONV_ACCEPTS_CONST_INPUT )
MESSAGE ( "ICONV_ACCEPTS_CONST_INPUT : yes" )
ENDIF( ICONV_ACCEPTS_CONST_INPUT )
# checking for Header files
check_include_file( "inttypes.h" have_inttypes_h )
check_include_file( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "iconv.h" HAVE_ICONV_H )
check_include_file( "stdbool.h" HAVE_STDBOOL_H )
check_include_file( "stdint.h" HAVE_STDINT_H )
check_include_file( "stdlib.h" HAVE_STDLIB_H )
@ -135,9 +128,7 @@ IF( NOT MSVC )
SET( HAVE_PID_T TRUE )
ENDIF( NOT MSVC )
SET( EXV_SYMBOLS HAVE_ICONV
HAVE_ICONV_H
HAVE_LENSDATA
SET( EXV_SYMBOLS HAVE_LENSDATA
HAVE_LIBINTL_H
HAVE_LIBZ
HAVE_MALLOC_H

@ -30,9 +30,8 @@
/* Define to 1 to enable translation of Nikon lens names. */
#cmakedefine EXV_HAVE_LENSDATA 1
/* Define to 1 if you have the `iconv' function. */
#cmakedefine EXV_HAVE_ICONV 1
// Define to 1 if you have the `iconv' function.
#cmakedefine EXV_HAVE_ICONV
/* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
#cmakedefine EXV_HAVE_PRINTUCS2 1
@ -44,7 +43,7 @@
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
#cmakedefine ICONV_ACCEPTS_CONST_INPUT 1
#cmakedefine ICONV_ACCEPTS_CONST_INPUT
#if defined ICONV_ACCEPTS_CONST_INPUT
#define EXV_ICONV_CONST const
#else

@ -49,9 +49,10 @@ endif( EXIV2_ENABLE_NLS )
find_package(Iconv)
if( ICONV_FOUND )
set( HAVE_ICONV 1 )
include_directories(${ICONV_INCLUDE_DIR})
message ( "-- ICONV_INCLUDE_DIR : " ${ICONV_INCLUDE_DIR} )
message ( "-- ICONV_LIBRARIES : " ${ICONV_LIBRARIES} )
message ( "-- ICONV_ACCEPTS_CONST_INPUT : ${ICONV_ACCEPTS_CONST_INPUT}" )
endif( ICONV_FOUND )
if( EXIV2_ENABLE_BUILD_PO )

@ -10,6 +10,7 @@ set(EXV_PACKAGE ${PACKAGE})
set(EXV_PACKAGE_VERSION ${PACKAGE_VERSION})
set(EXV_PACKAGE_STRING ${PACKAGE_STRING})
set(EXV_HAVE_XMP_TOOLKIT ${HAVE_XMP_TOOLKIT})
set(EXV_HAVE_ICONV ${ICONV_FOUND})
# TODO: Try to use the cmake function check_symbol_exists which is more robust
check_function_exists( gmtime_r EXV_HAVE_GMTIME_R )

Loading…
Cancel
Save