aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-23 09:53:16 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-23 09:53:16 +0200
commit9a340e5b8f3f9d5b8b27d7702bfe7650f7b915ef (patch)
tree9305094cdb98a68ba2e30738c88981233f3e8b04
parent7be129b72c09dd672b75f7cfa68ea3a3e271b18d (diff)
downloadxK-9a340e5b8f3f9d5b8b27d7702bfe7650f7b915ef.tar.gz
xK-9a340e5b8f3f9d5b8b27d7702bfe7650f7b915ef.tar.xz
xK-9a340e5b8f3f9d5b8b27d7702bfe7650f7b915ef.zip
Fix build under FreeBSD
-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)