cmake: Fix FindGTK3 not creating targets properly

This commit is contained in:
TellowKrinkle 2021-04-17 21:48:53 -05:00 committed by tellowkrinkle
parent 2c869afbc6
commit e788dd352c
1 changed files with 3 additions and 2 deletions

View File

@ -527,6 +527,7 @@ function(_GTK3_ADD_TARGET _var)
# Do not create the target if dependencies are missing
foreach(_dep ${_${_var}_GTK3_DEPENDS})
if(NOT TARGET GTK3::${_dep})
message("Not creating GTK3::${_basename}, missing GTK3::${_dep}")
return()
endif()
endforeach()
@ -735,7 +736,7 @@ foreach(_GTK3_component ${GTK3_FIND_COMPONENTS})
else()
_GTK3_FIND_LIBRARY (GDK gdk-win32 false true)
endif()
_GTK3_ADD_TARGET (GDK GTK3_DEPENDS pangocairo pango cairo-gobject cairo gdk_pixbuf gobject glib)
_GTK3_ADD_TARGET (GDK GTK3_DEPENDS pangocairo pango cairo_gobject cairo gdk_pixbuf gobject glib)
_GTK3_FIND_INCLUDE_DIR(GTK gtk/gtk.h)
if(UNIX)
@ -748,7 +749,7 @@ foreach(_GTK3_component ${GTK3_FIND_COMPONENTS})
else()
_GTK3_FIND_LIBRARY (GTK gtk-win32 false true)
endif()
_GTK3_ADD_TARGET (GTK GTK3_DEPENDS gdk atk pangocairo pango cairo-gobject cairo gdk_pixbuf gio gobject glib)
_GTK3_ADD_TARGET (GTK GTK3_DEPENDS gdk atk pangocairo pango cairo_gobject cairo gdk_pixbuf gio gobject glib)
elseif(_GTK3_component STREQUAL "gtkmm")