ClickHouse/cmake/find_iconv.cmake
proller 9cea606881 Fix linking iconv under macos and freebsd
Partially Revert "Removed usage of glib [#CLICKHOUSE-2]."
This reverts commit e4ff740ef1.
2017-01-31 04:15:59 +03:00

11 lines
433 B
CMake

if (APPLE OR CMAKE_SYSTEM MATCHES "FreeBSD")
set (ICONV_INCLUDE_PATHS "/usr/local/opt/libiconv/lib")
find_path (ICONV_INCLUDE_DIR iconv.h PATHS ${ICONV_INCLUDE_PATHS})
set (ICONV_PATHS "/usr/local/opt/libiconv/lib")
find_library (ICONV_LIBRARY iconv PATHS ${ICONV_PATHS})
message (STATUS "Using iconv: ${ICONV_INCLUDE_DIR} : ${ICONV_LIBRARY}")
include_directories(${ICONV_INCLUDE_DIR})
else ()
set (ICONV_LIBRARY "")
endif ()