summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r--Modules/FindX11.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index c979629..d72a4f6 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -89,6 +89,10 @@ IF (UNIX)
ENDIF(CMAKE_X11_INCLUDE_PATH)
IF(CMAKE_HAS_X)
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+ CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME)
+ IF (CMAKE_HAVE_GETHOSTBYNAME)
+ SET (CMAKE_X_EXTRA_LIBS "${CMAKE_X_EXTRA_LIBS};-nsl")
+ ENDIF (CMAKE_HAVE_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_SOCKET_LIBRARY)
IF (CMAKE_HAVE_SOCKET_LIBRARY)
SET (CMAKE_X_EXTRA_LIBS "${CMAKE_X_EXTRA_LIBS};-lsocket")