From 97c338bac910d087eff9b160e3b68f2eeee482a5 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Mon, 13 Aug 2012 19:39:30 +0200 Subject: FindX11: remove duplicates from X11 include path list (#13316) Most if not all X11 includes are typically in the same directory, so this usually returns a huge list with only very few different entries. --- Modules/FindX11.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 0b63bc9..01ba478 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -324,6 +324,9 @@ if (UNIX) set(X11_SM_FOUND TRUE) endif() + # Most of the X11 headers will be in the same directories, avoid + # creating a huge list of duplicates. + list(REMOVE_DUPLICATES X11_INCLUDE_DIR) # Deprecated variable for backwards compatibility with CMake 1.4 if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) -- cgit v0.12 From dd784dde7290b3c8c2fda4bb34b60cd20bb75a91 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 15 Aug 2012 19:28:50 +0200 Subject: FindX11: avoid calling list(REMOVE_DUPLICATES) on an empty list --- Modules/FindX11.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v0.12