summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bcb84ec..7714de8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,14 @@ find_package (PkgConfig REQUIRED)
pkg_check_modules (libssl REQUIRED libssl libcrypto)
pkg_check_modules (ncursesw ncursesw)
+if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
+ # iconv() doesn't have to be present in libc
+ # FIXME: detect if we need the library independently on the platform
+ list (APPEND project_libraries iconv)
+ # Need this for SIGWINCH; our POSIX version macros make it undefined
+ add_definitions (-D__BSD_VISIBLE=1)
+endif ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
+
# -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17
list (APPEND project_libraries ${libssl_LIBRARIES} rt pthread)