summaryrefslogtreecommitdiff
path: root/Modules/FindGTK2.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-09-17 16:49:26 +0200
committerBrad King <brad.king@kitware.com>2013-10-08 10:30:13 -0400
commitfffbd7252d45fd1e7085eb408d84498ed457893c (patch)
tree4444401b3e8c6e30f3128bf03dc7243c1e8c1d93 /Modules/FindGTK2.cmake
parentb69720d9ad08290d85eb2a71f9e7d194ad1755c8 (diff)
downloadcmake-fffbd7252d45fd1e7085eb408d84498ed457893c.tar.gz
FindGTK2: Do not add freetype includes if they are not found
On some older system they are not required
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r--Modules/FindGTK2.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 2020c06582..37a70e4753 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")