2016-05-25 11:11:49 +00:00
|
|
|
# - Try to find Iconv
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# ICONV_FOUND - system has Iconv
|
|
|
|
# ICONV_INCLUDES - the Iconv include directory
|
|
|
|
# ICONV_LIBRARIES - The libraries needed to use Iconv
|
|
|
|
#
|
2019-05-13 00:59:14 +00:00
|
|
|
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
2016-05-25 11:11:49 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2016-05-25 11:11:49 +00:00
|
|
|
if(ICONV_INCLUDES AND ICONV_LIBRARIES)
|
|
|
|
set(ICONV_FIND_QUIETLY TRUE)
|
|
|
|
endif()
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2016-05-25 11:11:49 +00:00
|
|
|
# Iconv does not provide pkg-config files
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2016-05-25 11:11:49 +00:00
|
|
|
find_path(ICONV_INCLUDES
|
|
|
|
NAMES
|
|
|
|
iconv.h
|
|
|
|
HINTS
|
|
|
|
$ENV{ICONVDIR}/include
|
|
|
|
${INCLUDE_INSTALL_DIR}
|
|
|
|
)
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2016-05-25 11:11:49 +00:00
|
|
|
find_library(ICONV_LIBRARIES
|
|
|
|
NAMES
|
2016-11-16 17:31:45 +00:00
|
|
|
iconv c
|
2016-05-25 11:11:49 +00:00
|
|
|
HINTS
|
|
|
|
$ENV{ICONVDIR}/lib
|
|
|
|
${LIB_INSTALL_DIR}
|
2015-12-10 05:06:13 +02:00
|
|
|
)
|
2016-05-25 11:11:49 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_INCLUDES ICONV_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(ICONV_INCLUDES ICONV_LIBRARIES)
|