diff options
author | Will Schroeder <will.schroeder@kitware.com> | 2002-11-12 21:27:24 (GMT) |
---|---|---|
committer | Will Schroeder <will.schroeder@kitware.com> | 2002-11-12 21:27:24 (GMT) |
commit | 4b7b9ab2ec8b044014f51f74f4a121f347ea2744 (patch) | |
tree | bdb9e34f7dc7ccc2a742e6dab43872f990d0f81b /Modules/FindX11.cmake | |
parent | e020a6d17120513129a651d8a354f1085941b8e2 (diff) | |
download | CMake-4b7b9ab2ec8b044014f51f74f4a121f347ea2744.zip CMake-4b7b9ab2ec8b044014f51f74f4a121f347ea2744.tar.gz CMake-4b7b9ab2ec8b044014f51f74f4a121f347ea2744.tar.bz2 |
Backwards compatibility. Andy and Bill made me add socket library.
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r-- | Modules/FindX11.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 509e6e9..c979629 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -12,6 +12,7 @@ IF (UNIX) SET(CMAKE_X_PRE_LIBS "") SET(CMAKE_X_REAL_LIBS "") SET(CMAKE_X_EXTRA_LIBS "") + SET(CMAKE_X_EXTRA_LIBS "") SET(CMAKE_HAS_X 0) FIND_PATH(CMAKE_X11_INCLUDE_PATH X11/X.h @@ -87,6 +88,11 @@ IF (UNIX) ENDIF(CMAKE_X_LIBS) ENDIF(CMAKE_X11_INCLUDE_PATH) IF(CMAKE_HAS_X) + INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) + CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_SOCKET_LIBRARY) + IF (CMAKE_HAVE_SOCKET_LIBRARY) + SET (CMAKE_X_EXTRA_LIBS "${CMAKE_X_EXTRA_LIBS};-lsocket") + ENDIF (CMAKE_HAVE_SOCKET_LIBRARY) SET (CMAKE_X_LIBS "${CMAKE_X_PRE_LIBS};${CMAKE_X_LIBS};${CMAKE_X_EXTRA_LIBS}" CACHE STRING "Libraries and options used in X11 programs.") @@ -102,4 +108,5 @@ IF (UNIX) CMAKE_Xlib_INCLUDE_PATH CMAKE_Xutil_INCLUDE_PATH ) + ENDIF (UNIX) |