José Matos wrote: > Hi Peter, > as the title says. > > I get > -- Looked for iconv library named iconv;libiconv;libiconv2. > -- Found no acceptable iconv library. This is fatal. > -- iconv header: /usr/include > -- iconv lib : ICONV_LIBRARY-NOTFOUND > CMake Error: Could NOT find iconv library > -- Configuring done > > If you read the file m4/iconv.m4 used by the autotools you will see that on > linux iconv is included in glibc there is not any need to link with an > external library. > > I would propose a patch by cmake experience has only a couple of > minutes. ;-) > > Regards,
Could you test attached patch? (I must leave now so I will reply tomorrow, or check it in by yourself) Cheers, Peter
Index: development/cmake/modules/FindICONV.cmake =================================================================== --- development/cmake/modules/FindICONV.cmake (Revision 18064) +++ development/cmake/modules/FindICONV.cmake (Arbeitskopie) @@ -66,14 +66,21 @@ MESSAGE(FATAL_ERROR "exit cmake") ENDIF(NOT ICONV_DLL AND ICONV_DLL_HELP) ENDIF(ICONV_FIND_REQUIRED) + IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY AND ICONV_DLL) + SET(ICONV_FOUND TRUE) + ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY AND ICONV_DLL) ELSE(WIN32) - set(ICONV_DLL TRUE) + check_function_exists(iconv HAVE_ICONV_IN_LIBC) + IF (ICONV_INCLUDE_DIR AND HAVE_ICONV_IN_LIBC) + SET(ICONV_FOUND TRUE) + SET(ICONV_LIBRARY CACHE TYPE STRING FORCE) + ENDIF (ICONV_INCLUDE_DIR AND HAVE_ICONV_IN_LIBC) + IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY) + SET(ICONV_FOUND TRUE) + ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY) endif(WIN32) -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY AND ICONV_DLL) - SET(ICONV_FOUND TRUE) -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARY AND ICONV_DLL) IF (ICONV_FOUND) IF (NOT ICONV_FIND_QUIETLY)