CMake: Improve finding Iconv
Continue when Iconv can not be found. Silence warnings when testing if second argument for iconv() is const. Use correct include dir.
This commit is contained in:
@@ -25,6 +25,7 @@ ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_QUIET ON)
|
||||
IF(ICONV_FOUND)
|
||||
check_cxx_source_compiles("
|
||||
#include <iconv.h>
|
||||
@@ -41,6 +42,7 @@ IF(ICONV_FOUND)
|
||||
ENDIF(ICONV_FOUND)
|
||||
set(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
IF(ICONV_FOUND)
|
||||
IF(NOT ICONV_FIND_QUIETLY)
|
||||
|
Reference in New Issue
Block a user