summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-09-17 14:49:26 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 14:30:13 (GMT)
commitfffbd7252d45fd1e7085eb408d84498ed457893c (patch)
tree4444401b3e8c6e30f3128bf03dc7243c1e8c1d93 /Modules
parentb69720d9ad08290d85eb2a71f9e7d194ad1755c8 (diff)
downloadCMake-fffbd7252d45fd1e7085eb408d84498ed457893c.zip
CMake-fffbd7252d45fd1e7085eb408d84498ed457893c.tar.gz
CMake-fffbd7252d45fd1e7085eb408d84498ed457893c.tar.bz2
FindGTK2: Do not add freetype includes if they are not found
On some older system they are not required
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGTK2.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 2020c06..37a70e4 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -481,7 +481,9 @@ function(_GTK2_ADD_TARGET_INCLUDE_DIRS _var)
if(TARGET GTK2::${_basename})
foreach(_include ${ARGN})
- set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}")
+ if(${_include})
+ set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}")
+ endif()
endforeach()
endif()
endfunction()
@@ -571,7 +573,9 @@ endif()
#
find_package(Freetype QUIET)
-list(APPEND GTK2_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
+if(${FREETYPE_INCLUDE_DIR_ft2build} AND ${FREETYPE_INCLUDE_DIR_freetype2})
+ list(APPEND GTK2_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
+endif()
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
if(_GTK2_component STREQUAL "gtk")