I have not found one module to find iconv library in cmake, so I wrote one, here is the code:<br><br># Find iconv library<br># <br># Author: Eddy Xu <<a href="mailto:eddyxu@gmail.com">eddyxu@gmail.com</a>><br>#<br># Released under BSD license
<br># <br># ICONV_INCLUDE_DIRS - where to find iconv.h, etc<br># ICONV_LIBRARIES - Lists of libraries when using iconv<br># ICONV_FOUND - True if iconv found<br><br><br># Look for the header file<br>FIND_PATH( ICONV_INCLUDE_DIR NAMES
iconv.h )<br>MARK_AS_ADVANCED( ICONV_INCLUDE_DIR )<br><br># Look for the library<br>FIND_LIBRARY( ICONV_LIBRARY NAMES iconv )<br>MARK_AS_ADVANCED( ICONV_LIBRARY )<br><br># Copy the result to output variables<br>IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
<br> SET(ICONV_FOUND 1)<br> SET(ICONV_LIBRARIES ${ICONV_LIBRARY})<br> SET(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR})<br>ELSE(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)<br> SET(ICONV_FOUND 0)<br> SET(ICONV_LIBRARIES)<br> SET(ICONV_INCLUDE_DIRS)
<br>ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)<br><br># Report results<br>IF(NOT ICONV_FOUND)<br> SET(ICONV_DIR_MESSAGE<br> "Iconv was not found. Make sure ICONV_LIBRARY and ICONV_INCLUDE_DIR are set.")<br> IF(NOT ICONV_FIND_QUIETLY)
<br> MESSAGE(STATUS ${ICONV_DIR_MESSAGE})<br> ELSE(NOT ICONV_FIND_QUIETLY)<br> IF(ICONV_FIND_REQUIRED)<br> MESSAGE(FETAL_ERROR ${ICONV_DIR_MESSAGE})<br> ENDIF(ICONV_FIND_REQUIRED)<br> ENDIF(NOT ICONV_FIND_QUIETLY)
<br>ENDIF(NOT ICONV_FOUND)<br><br>I hope it helps<br>