summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-03-17 15:10:42 (GMT)
committerBrad King <brad.king@kitware.com>2008-03-17 15:10:42 (GMT)
commit7a888b68daa674690088f0beaf1a83fa8e409138 (patch)
treebc21d74ec3f7bcf2ceba288da2cf0610f5fcfff1 /Modules/FindX11.cmake
parent98e06794dd2b4554e1fc82314edc9a5c7a232d7d (diff)
downloadCMake-7a888b68daa674690088f0beaf1a83fa8e409138.zip
CMake-7a888b68daa674690088f0beaf1a83fa8e409138.tar.gz
CMake-7a888b68daa674690088f0beaf1a83fa8e409138.tar.bz2
ENH: Added FindPackageMessage module
- Defines FIND_PACKAGE_MESSAGE function to help display find result messages only once - Added use of it to FindPackageHandleStandardArgs - Added use of it to FindQt4, and FindX11 - This cleans up repeated messages in big projects
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 e5fff88..f3e8807 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -127,6 +127,7 @@ IF (UNIX)
GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
ENDIF(X11_X11_LIB)
+ SET(X11_INCLUDE_DIR) # start with empty list
IF(X11_X11_INCLUDE_PATH)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
ENDIF(X11_X11_INCLUDE_PATH)
@@ -145,6 +146,7 @@ IF (UNIX)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH})
ENDIF(X11_Xshape_INCLUDE_PATH)
+ SET(X11_LIBRARIES) # start with empty list
IF(X11_X11_LIB)
SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
ENDIF(X11_X11_LIB)
@@ -354,7 +356,9 @@ IF (UNIX)
# Build the final list of libraries.
SET(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
- MESSAGE(STATUS "Found X11: ${X11_X11_LIB}")
+ INCLUDE(FindPackageMessage)
+ FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
+ "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
ELSE (X11_FOUND)
IF (X11_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find X11")