diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-04-27 15:40:50 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-04-27 15:40:50 +0200 |
commit | 34c40b7ba465382cfc3ef83af00793dfbb8fa943 (patch) | |
tree | 9f64215f326c3847699ae8856ae9cd0d609cbfac /src/ipcpd/shim-udp/CMakeLists.txt | |
parent | b6dc5ba9576d61d42db82c3da8cb0c039fac7179 (diff) | |
parent | 6809a2beea07a661a9c651cae1e100537c401bb7 (diff) | |
download | ouroboros-34c40b7ba465382cfc3ef83af00793dfbb8fa943.tar.gz ouroboros-34c40b7ba465382cfc3ef83af00793dfbb8fa943.zip |
Merge remote-tracking branch 'upstream/be' into be
Diffstat (limited to 'src/ipcpd/shim-udp/CMakeLists.txt')
-rw-r--r-- | src/ipcpd/shim-udp/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ipcpd/shim-udp/CMakeLists.txt b/src/ipcpd/shim-udp/CMakeLists.txt index 27907880..f730fa3a 100644 --- a/src/ipcpd/shim-udp/CMakeLists.txt +++ b/src/ipcpd/shim-udp/CMakeLists.txt @@ -10,6 +10,21 @@ include_directories(${CURRENT_BINARY_PARENT_DIR}) include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) +# Find library needed for gethostbyname. +include(CheckFunctionExists) +CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) +IF(NOT CMAKE_HAVE_GETHOSTBYNAME) + CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + IF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl) + ELSE (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + IF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd) + ENDIF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + ENDIF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) +ENDIF(NOT CMAKE_HAVE_GETHOSTBYNAME) + SET(IPCP_SHIM_UDP_TARGET ipcpd-shim-udp CACHE STRING "IPCP_SHIM_UDP_TARGET") set(SHIM_UDP_SOURCES |