summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-08-15 17:28:50 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-08-15 17:28:50 (GMT)
commitdd784dde7290b3c8c2fda4bb34b60cd20bb75a91 (patch)
tree58e57979fe4f0c98fcba955c4e8e94d3e7c1fbe3
parent97c338bac910d087eff9b160e3b68f2eeee482a5 (diff)
downloadCMake-dd784dde7290b3c8c2fda4bb34b60cd20bb75a91.zip
CMake-dd784dde7290b3c8c2fda4bb34b60cd20bb75a91.tar.gz
CMake-dd784dde7290b3c8c2fda4bb34b60cd20bb75a91.tar.bz2
FindX11: avoid calling list(REMOVE_DUPLICATES) on an empty list
-rw-r--r--Modules/FindX11.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 01ba478..e12dc0a 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -326,7 +326,9 @@ if (UNIX)
# Most of the X11 headers will be in the same directories, avoid
# creating a huge list of duplicates.
- list(REMOVE_DUPLICATES X11_INCLUDE_DIR)
+ if (X11_INCLUDE_DIR)
+ list(REMOVE_DUPLICATES X11_INCLUDE_DIR)
+ endif ()
# Deprecated variable for backwards compatibility with CMake 1.4
if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)