summaryrefslogtreecommitdiffstats
path: root/Modules/FindX11.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindX11.cmake')
-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)