mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
cmake: Fix iconv detection on FreeBSD.
This commit is contained in:
parent
bdb3772e8f
commit
341e0e8967
3 changed files with 17 additions and 11 deletions
|
@ -43,6 +43,7 @@ else()
|
|||
check_function_exists(iconv HAVE_ICONV)
|
||||
endif()
|
||||
|
||||
if (HAVE_ICONV_H OR HAVE_SYS_ICONV_H)
|
||||
if (HAVE_ICONV_H)
|
||||
set(_ICONV_PROTO_INCLUDE "iconv.h")
|
||||
endif (HAVE_ICONV_H)
|
||||
|
@ -50,11 +51,14 @@ if (HAVE_SYS_ICONV_H)
|
|||
set(_ICONV_PROTO_INCLUDE "sys/iconv.h")
|
||||
endif (HAVE_SYS_ICONV_H)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||
check_prototype_definition(iconv
|
||||
"size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)"
|
||||
"-1"
|
||||
${_ICONV_PROTO_INCLUDE}
|
||||
HAVE_ICONV_CONST)
|
||||
set(CMAKE_REQUIRED_INCLUDES)
|
||||
endif (HAVE_ICONV_H OR HAVE_SYS_ICONV_H)
|
||||
|
||||
set(ICONV_INCLUDE_DIRS
|
||||
${ICONV_INCLUDE_DIR}
|
||||
|
|
|
@ -12,6 +12,7 @@ set(CSYNC_PUBLIC_INCLUDE_DIRS
|
|||
)
|
||||
|
||||
set(CSYNC_PRIVATE_INCLUDE_DIRS
|
||||
${ICONV_INCLUDE_DIRS}
|
||||
${INIPARSER_INCLUDE_DIRS}
|
||||
${SQLITE3_INCLUDE_DIRS}
|
||||
${CSTDLIB_PUBLIC_INCLUDE_DIRS}
|
||||
|
|
|
@ -6,6 +6,7 @@ set(CSTDLIB_PUBLIC_INCLUDE_DIRS
|
|||
)
|
||||
|
||||
set(CSYNC_PRIVATE_INCLUDE_DIRS
|
||||
${ICONV_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(CSTDLIB_LIBRARY
|
||||
|
|
Loading…
Reference in a new issue