FindGTK2: Do not add freetype includes if they are not found
On some older system they are not required
This commit is contained in:
parent
b69720d9ad
commit
fffbd7252d
|
@ -481,7 +481,9 @@ function(_GTK2_ADD_TARGET_INCLUDE_DIRS _var)
|
||||||
|
|
||||||
if(TARGET GTK2::${_basename})
|
if(TARGET GTK2::${_basename})
|
||||||
foreach(_include ${ARGN})
|
foreach(_include ${ARGN})
|
||||||
|
if(${_include})
|
||||||
set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}")
|
set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}")
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@ -571,7 +573,9 @@ endif()
|
||||||
#
|
#
|
||||||
|
|
||||||
find_package(Freetype QUIET)
|
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})
|
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
||||||
if(_GTK2_component STREQUAL "gtk")
|
if(_GTK2_component STREQUAL "gtk")
|
||||||
|
|
Loading…
Reference in New Issue