aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-08-06 21:58:13 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-08-06 21:58:13 +0200
commitaa77bc41d08aba90dd468e96f1cc662583d673ba (patch)
tree04898c2f06467cf4217142b94a692b4bc2c0d01b /CMakeLists.txt
parent5b208547c46a8c3d0271f044cc8a410f906522de (diff)
downloadxK-aa77bc41d08aba90dd468e96f1cc662583d673ba.tar.gz
xK-aa77bc41d08aba90dd468e96f1cc662583d673ba.tar.xz
xK-aa77bc41d08aba90dd468e96f1cc662583d673ba.zip
Fix library searching
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 5 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8170ce2..107a151 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,23 +34,18 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
endif ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
-# iconv may or may not be present in libc
-find_library (iconv_LIBRARIES iconv)
-if (iconv_LIBRARIES)
- list (APPEND project_libraries ${iconv_LIBRARIES})
-endif (iconv_LIBRARIES)
-
list (APPEND project_libraries ${libssl_LIBRARIES})
include_directories (${libssl_INCLUDE_DIRS})
link_directories (${libssl_LIBRARY_DIRS})
# -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17
-foreach (extra rt pthread)
- find_library (extra_lib ${extra})
- if (extra_lib)
+# -liconv may or may not be a part of libc
+foreach (extra iconv rt pthread)
+ find_library (extra_lib_${extra} ${extra})
+ if (extra_lib_${extra})
list (APPEND project_libraries ${extra})
- endif (extra_lib)
+ endif (extra_lib_${extra})
endforeach (extra)
if (ncursesw_FOUND)