summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/CMakeLists.txt
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-27 15:31:13 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-27 15:31:13 +0200
commit6809a2beea07a661a9c651cae1e100537c401bb7 (patch)
tree9f64215f326c3847699ae8856ae9cd0d609cbfac /src/ipcpd/shim-udp/CMakeLists.txt
parenta618984537f7790cd274d097223b4029473044c2 (diff)
parenta17657c4321dc0770e5431467261eb2bc579f79c (diff)
downloadouroboros-6809a2beea07a661a9c651cae1e100537c401bb7.tar.gz
ouroboros-6809a2beea07a661a9c651cae1e100537c401bb7.zip
Merged in dstaesse/ouroboros/udp-dev (pull request #60)
shim-udp: flow allocation added
Diffstat (limited to 'src/ipcpd/shim-udp/CMakeLists.txt')
-rw-r--r--src/ipcpd/shim-udp/CMakeLists.txt15
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