Attempt to fix build problem on some platforms

This commit is contained in:
Andy Cedilnik 2003-01-29 09:06:46 -05:00
parent d1925b4443
commit d530fbe731
1 changed files with 7 additions and 2 deletions

View File

@ -59,6 +59,11 @@ IF (UNIX)
ENDIF(X11_LIBRARIES) ENDIF(X11_LIBRARIES)
ENDIF(X11_X11_INCLUDE_PATH) 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) IF(X11_FOUND)
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
@ -71,7 +76,7 @@ IF (UNIX)
SET(X11_X_EXTRA_LIBS "") SET(X11_X_EXTRA_LIBS "")
# See if XOpenDisplay in X11 works by itself. # 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) IF(NOT X11_LIB_X11_SOLO)
# Find library needed for dnet_ntoa. # Find library needed for dnet_ntoa.
CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_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(NOT CMAKE_HAVE_SHMAT)
ENDIF($ENV{ISC} MATCHES "^yes$") ENDIF($ENV{ISC} MATCHES "^yes$")
CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "" CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}"
CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
SET (X11_X_PRE_LIBS -lSM -lICE) SET (X11_X_PRE_LIBS -lSM -lICE)