summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-20 21:02:38 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-20 21:02:38 (GMT)
commit9de44ef28a99f45069205d39026896bfcaac2ba5 (patch)
tree606cd85e526bec9889b2d9e00ee51c85db876f33 /Modules/FindX11.cmake
parentb28c2625c7472ae7b426741f0dc65a3e1c16b3c7 (diff)
downloadCMake-9de44ef28a99f45069205d39026896bfcaac2ba5.zip
CMake-9de44ef28a99f45069205d39026896bfcaac2ba5.tar.gz
CMake-9de44ef28a99f45069205d39026896bfcaac2ba5.tar.bz2
BUG: FindX11 module should search for SM library instead of returning -lSM.
Diffstat (limited to 'Modules/FindX11.cmake')
-rw-r--r--Modules/FindX11.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 07e164a..e5fff88 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -102,6 +102,7 @@ IF (UNIX)
# Find additional X libraries. Keep list sorted by library name.
FIND_LIBRARY(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH})
+ FIND_LIBRARY(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH})
@@ -343,7 +344,10 @@ IF (UNIX)
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 ${X11_ICE_LIB})
+ SET (X11_X_PRE_LIBS ${X11_ICE_LIB})
+ IF(X11_SM_LIB)
+ SET (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS})
+ ENDIF(X11_SM_LIB)
ENDIF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
ENDIF (X11_ICE_FOUND)