Fix library searching
This commit is contained in:
parent
5b208547c4
commit
aa77bc41d0
|
@ -34,23 +34,18 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
|
||||||
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
|
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
|
||||||
endif ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
|
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})
|
list (APPEND project_libraries ${libssl_LIBRARIES})
|
||||||
include_directories (${libssl_INCLUDE_DIRS})
|
include_directories (${libssl_INCLUDE_DIRS})
|
||||||
link_directories (${libssl_LIBRARY_DIRS})
|
link_directories (${libssl_LIBRARY_DIRS})
|
||||||
|
|
||||||
# -lpthread is only there for debugging (gdb & errno)
|
# -lpthread is only there for debugging (gdb & errno)
|
||||||
# -lrt is only for glibc < 2.17
|
# -lrt is only for glibc < 2.17
|
||||||
foreach (extra rt pthread)
|
# -liconv may or may not be a part of libc
|
||||||
find_library (extra_lib ${extra})
|
foreach (extra iconv rt pthread)
|
||||||
if (extra_lib)
|
find_library (extra_lib_${extra} ${extra})
|
||||||
|
if (extra_lib_${extra})
|
||||||
list (APPEND project_libraries ${extra})
|
list (APPEND project_libraries ${extra})
|
||||||
endif (extra_lib)
|
endif (extra_lib_${extra})
|
||||||
endforeach (extra)
|
endforeach (extra)
|
||||||
|
|
||||||
if (ncursesw_FOUND)
|
if (ncursesw_FOUND)
|
||||||
|
|
Loading…
Reference in New Issue