summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-29 14:06:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-29 14:06:46 (GMT)
commitd530fbe731c0c99cef151337fbe521f330420dad (patch)
treeaa9abee2e36fd435ed509555f13b9162b6838b54 /Modules
parentd1925b4443d7b55cc1afaeda70878a063ec9c0a8 (diff)
downloadCMake-d530fbe731c0c99cef151337fbe521f330420dad.zip
CMake-d530fbe731c0c99cef151337fbe521f330420dad.tar.gz
CMake-d530fbe731c0c99cef151337fbe521f330420dad.tar.bz2
Attempt to fix build problem on some platforms
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindX11.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index ed5cbf9..07a5f66 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -59,6 +59,11 @@ IF (UNIX)
ENDIF(X11_LIBRARIES)
ENDIF(X11_X11_INCLUDE_PATH)
+ SET(X11_LIBRARY_DIR "")
+ IF(X11_X11_LIB)
+ GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
+ ENDIF(X11_X11_LIB)
+
IF(X11_FOUND)
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
@@ -71,7 +76,7 @@ IF (UNIX)
SET(X11_X_EXTRA_LIBS "")
# See if XOpenDisplay in X11 works by itself.
- CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "" X11_LIB_X11_SOLO)
+ CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO)
IF(NOT X11_LIB_X11_SOLO)
# Find library needed for dnet_ntoa.
CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
@@ -127,7 +132,7 @@ IF (UNIX)
ENDIF(NOT CMAKE_HAVE_SHMAT)
ENDIF($ENV{ISC} MATCHES "^yes$")
- CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" ""
+ CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}"
CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
SET (X11_X_PRE_LIBS -lSM -lICE)