diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aada20f..384098e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,10 +64,18 @@ endif ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD") foreach (extra iconv rt) find_library (extra_lib_${extra} ${extra}) if (extra_lib_${extra}) - list (APPEND project_libraries ${extra}) + list (APPEND project_libraries ${extra_lib_${extra}}) endif (extra_lib_${extra}) endforeach (extra) +include (CheckCSourceRuns) +set (CMAKE_REQUIRED_LIBRARIES ${project_libraries}) +get_property (CMAKE_REQUIRED_INCLUDES + DIRECTORY "${PROJECT_SOURCE_DIR}" PROPERTY INCLUDE_DIRECTORIES) +CHECK_C_SOURCE_RUNS ("#include <iconv.h> + int main () { return iconv_open (\"UTF-8//TRANSLIT\", \"ISO-8859-1\") + == (iconv_t) -1; }" ICONV_ACCEPTS_TRANSLIT) + # Dependencies for degesch pkg_check_modules (libffi REQUIRED libffi) list (APPEND degesch_libraries ${libffi_LIBRARIES}) |