summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2014-09-01 17:40:27 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2014-09-04 03:25:57 (GMT)
commitcb8f0f7c813f718bf8a8f8896b52de03bc9c6106 (patch)
tree77b8159e5daf7720384bd43b21b98d9a29187507 /Modules
parent75abb6da979b4abfaf5e00b32c81239116fa2406 (diff)
downloadCMake-cb8f0f7c813f718bf8a8f8896b52de03bc9c6106.zip
CMake-cb8f0f7c813f718bf8a8f8896b52de03bc9c6106.tar.gz
CMake-cb8f0f7c813f718bf8a8f8896b52de03bc9c6106.tar.bz2
FindGTK2: Fix missing optional include dirs.
FindGTK2 was adding optional include directories to the interface include dirs regardless of whether or not they existed. This ensures that the directories only get added if they are actually found. This is particularly a problem on Solaris where the gtk2 libs and headers might exist but the FreeType2 headers might not.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGTK2.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index eaa5e55..67dc0eb 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -540,7 +540,11 @@ function(_GTK2_ADD_TARGET _var)
endif()
if(_${_var}_OPTIONAL_INCLUDES)
- _GTK2_ADD_TARGET_INCLUDE_DIRS(${_var} ${_${_var}_OPTIONAL_INCLUDES})
+ foreach(_D ${_${_var}_OPTIONAL_INCLUDES})
+ if(_D)
+ _GTK2_ADD_TARGET_INCLUDE_DIRS(${_var} ${_D})
+ endif()
+ endforeach()
endif()
if(GTK2_USE_IMPORTED_TARGETS)