diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-13 11:36:04 -0500 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-13 11:36:04 -0500 |
commit | 09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9 (patch) | |
tree | e9da366b95f58ac629f1e0d805578b744a381fbc /Modules/FindX11.cmake | |
parent | e0671aba949e9f0b97e96cd0605b1e02f7bdebf9 (diff) | |
download | cmake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.tar.gz |
fix for nsl library and X11
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r-- | Modules/FindX11.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index c979629b86..d72a4f6c6f 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") |