diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-03-26 14:07:09 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-03-26 14:27:59 +0100 |
commit | 550a0419a64f01e8b14f5ecaed6f1b8d190837f5 (patch) | |
tree | c4d63ba229c8ac13316508c26141ecfc2bd150c0 /CMakeLists.txt | |
parent | 9b12c830d10a84460b79ac6b7a10e2bf190722ef (diff) | |
download | xK-550a0419a64f01e8b14f5ecaed6f1b8d190837f5.tar.gz xK-550a0419a64f01e8b14f5ecaed6f1b8d190837f5.tar.xz xK-550a0419a64f01e8b14f5ecaed6f1b8d190837f5.zip |
degesch: detect //TRANSLIT support, use cp1252
Now BSDs should have it enabled as well.
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}) |