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.
This commit is contained in:
Chuck Atkins 2014-09-01 13:40:27 -04:00
parent 75abb6da97
commit cb8f0f7c81
1 changed files with 5 additions and 1 deletions

View File

@ -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)