summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-13 16:36:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-13 16:36:04 (GMT)
commit09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9 (patch)
treee9da366b95f58ac629f1e0d805578b744a381fbc /Modules/FindX11.cmake
parente0671aba949e9f0b97e96cd0605b1e02f7bdebf9 (diff)
downloadCMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.zip
CMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.tar.gz
CMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.tar.bz2
fix for nsl library and X11
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")