gtk2/gtk/meson.build

1037 lines
28 KiB
Meson
Raw Normal View History

subdir('deprecated')
subdir('a11y')
subdir('inspector')
gtk_public_sources = files([
2016-09-26 10:51:17 +00:00
'fallback-c89.c',
'fnmatch.c',
2016-09-26 10:51:17 +00:00
'gdkpixbufutils.c',
'gtkaboutdialog.c',
'gtkaccelgroup.c',
'gtkaccellabel.c',
'gtkaccelmap.c',
'gtkaccessible.c',
2016-09-26 10:51:17 +00:00
'gtkactionable.c',
'gtkactionbar.c',
'gtkactionhelper.c',
2016-09-26 10:51:17 +00:00
'gtkactionmuxer.c',
'gtkactionobservable.c',
'gtkactionobserver.c',
'gtkadjustment.c',
'gtkallocatedbitmask.c',
'gtkappchooser.c',
'gtkappchooserbutton.c',
'gtkappchooserdialog.c',
2016-09-26 10:51:17 +00:00
'gtkappchooserwidget.c',
'gtkapplication.c',
2016-09-26 10:51:17 +00:00
'gtkapplicationaccels.c',
'gtkapplicationimpl.c',
'gtkapplicationwindow.c',
'gtkaspectframe.c',
'gtkassistant.c',
'gtkbbox.c',
'gtkbin.c',
'gtkbindings.c',
'gtkbookmarksmanager.c',
'gtkborder.c',
'gtkbox.c',
2016-09-26 10:51:17 +00:00
'gtkboxgadget.c',
'gtkbuildable.c',
2016-09-26 10:51:17 +00:00
'gtkbuilder-menus.c',
'gtkbuilder.c',
'gtkbuilderparser.c',
2016-09-26 10:51:17 +00:00
'gtkbuiltinicon.c',
'gtkbutton.c',
'gtkcalendar.c',
'gtkcellarea.c',
'gtkcellareabox.c',
'gtkcellareaboxcontext.c',
'gtkcellareacontext.c',
'gtkcelleditable.c',
'gtkcelllayout.c',
'gtkcellrenderer.c',
'gtkcellrendereraccel.c',
'gtkcellrenderercombo.c',
'gtkcellrendererpixbuf.c',
'gtkcellrendererprogress.c',
'gtkcellrendererspin.c',
'gtkcellrendererspinner.c',
'gtkcellrenderertext.c',
'gtkcellrenderertoggle.c',
'gtkcellview.c',
'gtkcenterbox.c',
'gtkcheckbutton.c',
'gtkcheckmenuitem.c',
'gtkcolorbutton.c',
'gtkcolorchooser.c',
'gtkcolorchooserdialog.c',
2016-09-26 10:51:17 +00:00
'gtkcolorchooserwidget.c',
'gtkcoloreditor.c',
'gtkcolorplane.c',
'gtkcolorscale.c',
'gtkcolorswatch.c',
'gtkcolorutils.c',
'gtkcombobox.c',
'gtkcomboboxtext.c',
2016-09-26 10:51:17 +00:00
'gtkcomposetable.c',
'gtkcontainer.c',
'gtkcssanimatedstyle.c',
2016-09-26 10:51:17 +00:00
'gtkcssanimation.c',
'gtkcssarrayvalue.c',
'gtkcssbgsizevalue.c',
'gtkcssbordervalue.c',
2016-09-26 10:51:17 +00:00
'gtkcsscalcvalue.c',
'gtkcsscolorvalue.c',
'gtkcsscornervalue.c',
2016-09-26 10:51:17 +00:00
'gtkcsscustomgadget.c',
'gtkcssdimensionvalue.c',
'gtkcsseasevalue.c',
2016-09-26 10:51:17 +00:00
'gtkcssenumvalue.c',
'gtkcssfiltervalue.c',
2016-09-26 10:51:17 +00:00
'gtkcssgadget.c',
'gtkcssiconthemevalue.c',
'gtkcssimage.c',
'gtkcssimagebuiltin.c',
'gtkcssimagecrossfade.c',
2016-09-26 10:51:17 +00:00
'gtkcssimagefallback.c',
'gtkcssimageicontheme.c',
'gtkcssimagelinear.c',
2016-09-26 10:51:17 +00:00
'gtkcssimageradial.c',
'gtkcssimagerecolor.c',
'gtkcssimagescaled.c',
'gtkcssimagesurface.c',
'gtkcssimageurl.c',
'gtkcssimagevalue.c',
'gtkcssimagewin32.c',
'gtkcssinheritvalue.c',
'gtkcssinitialvalue.c',
'gtkcsskeyframes.c',
'gtkcsslookup.c',
'gtkcssmatcher.c',
'gtkcssnode.c',
'gtkcssnodedeclaration.c',
2016-09-26 10:51:17 +00:00
'gtkcssnodestylecache.c',
'gtkcssnumbervalue.c',
2016-09-26 10:51:17 +00:00
'gtkcsspalettevalue.c',
'gtkcssparser.c',
'gtkcsspathnode.c',
'gtkcsspositionvalue.c',
'gtkcssprovider.c',
'gtkcssrepeatvalue.c',
'gtkcssrgbavalue.c',
'gtkcsssection.c',
'gtkcssselector.c',
'gtkcssshadowsvalue.c',
'gtkcssshadowvalue.c',
'gtkcssshorthandproperty.c',
'gtkcssshorthandpropertyimpl.c',
'gtkcssstaticstyle.c',
2016-09-26 10:51:17 +00:00
'gtkcssstringvalue.c',
'gtkcssstyle.c',
'gtkcssstylechange.c',
'gtkcssstylefuncs.c',
'gtkcssstyleproperty.c',
'gtkcssstylepropertyimpl.c',
'gtkcsstransformvalue.c',
'gtkcsstransientnode.c',
'gtkcsstransition.c',
'gtkcsstypes.c',
2016-09-26 10:51:17 +00:00
'gtkcssunsetvalue.c',
'gtkcssvalue.c',
'gtkcsswidgetnode.c',
2016-09-26 10:51:17 +00:00
'gtkcsswin32sizevalue.c',
2017-02-12 00:42:37 +00:00
'gtkdebugupdates.c',
'gtkdialog.c',
2016-09-26 10:51:17 +00:00
'gtkdragsource.c',
'gtkdrawingarea.c',
'gtkeditable.c',
'gtkentry.c',
'gtkentrybuffer.c',
'gtkentrycompletion.c',
'gtkeventbox.c',
'gtkeventcontroller.c',
'gtkexpander.c',
'gtkfilechooser.c',
'gtkfilechooserbutton.c',
'gtkfilechooserdialog.c',
'gtkfilechooserembed.c',
'gtkfilechooserentry.c',
'gtkfilechoosererrorstack.c',
2016-09-26 10:51:17 +00:00
'gtkfilechoosernative.c',
'gtkfilechoosernativeportal.c',
'gtkfilechooserutils.c',
'gtkfilechooserwidget.c',
'gtkfilefilter.c',
'gtkfilesystem.c',
'gtkfilesystemmodel.c',
'gtkfixed.c',
'gtkflowbox.c',
'gtkfontbutton.c',
'gtkfontchooser.c',
'gtkfontchooserdialog.c',
'gtkfontchooserutils.c',
'gtkfontchooserwidget.c',
'gtkframe.c',
'gtkgesture.c',
'gtkgesturedrag.c',
'gtkgesturelongpress.c',
'gtkgesturemultipress.c',
'gtkgesturepan.c',
'gtkgesturerotate.c',
'gtkgesturesingle.c',
'gtkgestureswipe.c',
'gtkgesturezoom.c',
'gtkgizmo.c',
'gtkgladecatalog.c',
'gtkglarea.c',
'gtkgrid.c',
'gtkheaderbar.c',
'gtkhsla.c',
2016-09-26 10:51:17 +00:00
'gtkicon.c',
'gtkiconcache.c',
'gtkiconcachevalidator.c',
'gtkiconhelper.c',
'gtkicontheme.c',
'gtkiconview.c',
'gtkimage.c',
2016-09-26 10:51:17 +00:00
'gtkimagedefinition.c',
'gtkimcontext.c',
'gtkimcontextsimple.c',
'gtkimmodule.c',
'gtkimmulticontext.c',
'gtkinfobar.c',
'gtkinvisible.c',
'gtkkeyhash.c',
'gtkkineticscrolling.c',
'gtklabel.c',
'gtklayout.c',
'gtklevelbar.c',
'gtklinkbutton.c',
'gtklistbox.c',
'gtkliststore.c',
'gtklockbutton.c',
'gtkmagnifier.c',
2016-09-26 10:51:17 +00:00
'gtkmain.c',
'gtkmenu.c',
'gtkmenubar.c',
'gtkmenubutton.c',
'gtkmenuitem.c',
'gtkmenusectionbox.c',
'gtkmenushell.c',
2016-09-26 10:51:17 +00:00
'gtkmenutoolbutton.c',
'gtkmenutracker.c',
'gtkmenutrackeritem.c',
'gtkmessagedialog.c',
'gtkmnemonichash.c',
'gtkmodelbutton.c',
2016-09-26 10:51:17 +00:00
'gtkmodelmenuitem.c',
'gtkmodules.c',
'gtkmountoperation.c',
2016-09-26 10:51:17 +00:00
'gtknativedialog.c',
'gtknotebook.c',
'gtkorientable.c',
'gtkoverlay.c',
2016-08-23 06:21:54 +00:00
'gtkpadcontroller.c',
'gtkpagesetup.c',
'gtkpaned.c',
'gtkpango.c',
'gtkpapersize.c',
'gtkpathbar.c',
'gtkplacessidebar.c',
'gtkplacesview.c',
'gtkplacesviewrow.c',
'gtkpointerfocus.c',
2016-09-26 10:51:17 +00:00
'gtkpopover.c',
'gtkpopovermenu.c',
'gtkprintcontext.c',
2016-09-26 10:51:17 +00:00
'gtkprintoperation-portal.c',
'gtkprintoperation.c',
'gtkprintoperationpreview.c',
'gtkprintsettings.c',
'gtkprintutils.c',
'gtkprivate.c',
'gtkprogressbar.c',
2016-09-26 10:51:17 +00:00
'gtkprogresstracker.c',
'gtkquery.c',
'gtkradiobutton.c',
'gtkradiomenuitem.c',
'gtkradiotoolbutton.c',
'gtkrange.c',
'gtkrbtree.c',
2016-09-26 10:51:17 +00:00
'gtkrecentchooser.c',
'gtkrecentchooserdefault.c',
'gtkrecentchooserdialog.c',
'gtkrecentchoosermenu.c',
'gtkrecentchooserutils.c',
2016-09-26 10:51:17 +00:00
'gtkrecentchooserwidget.c',
'gtkrecentfilter.c',
'gtkrecentmanager.c',
'gtkrender.c',
'gtkrenderbackground.c',
'gtkrenderborder.c',
'gtkrendericon.c',
'gtkrevealer.c',
'gtkroundedbox.c',
'gtkscale.c',
'gtkscalebutton.c',
'gtkscrollable.c',
'gtkscrollbar.c',
'gtkscrolledwindow.c',
2016-09-26 10:51:17 +00:00
'gtksearchbar.c',
'gtksearchengine.c',
'gtksearchenginemodel.c',
'gtksearchenginesimple.c',
'gtksearchentry.c',
'gtkselection.c',
'gtkseparator.c',
'gtkseparatormenuitem.c',
'gtkseparatortoolitem.c',
'gtksettings.c',
2016-09-26 10:51:17 +00:00
'gtkshortcutlabel.c',
'gtkshortcutsgroup.c',
'gtkshortcutssection.c',
'gtkshortcutsshortcut.c',
'gtkshortcutswindow.c',
'gtkshow.c',
'gtksidebarrow.c',
'gtksizegroup.c',
'gtksizerequest.c',
'gtksizerequestcache.c',
'gtkspinbutton.c',
'gtksnapshot.c',
'gtkspinner.c',
'gtkstack.c',
2016-09-26 10:51:17 +00:00
'gtkstacksidebar.c',
'gtkstackswitcher.c',
'gtkstatusbar.c',
'gtkstyleanimation.c',
'gtkstylecascade.c',
'gtkstylecontext.c',
'gtkstyleproperty.c',
'gtkstyleprovider.c',
'gtkstyleproviderprivate.c',
'gtkswitch.c',
'gtktestutils.c',
'gtktextattributes.c',
'gtktextbtree.c',
'gtktextbuffer.c',
'gtktextbufferrichtext.c',
'gtktextbufferserialize.c',
'gtktextchild.c',
'gtktextdisplay.c',
'gtktexthandle.c',
'gtktextiter.c',
'gtktextlayout.c',
'gtktextmark.c',
'gtktextsegment.c',
'gtktexttag.c',
'gtktexttagtable.c',
'gtktexttypes.c',
'gtktextutil.c',
'gtktextview.c',
'gtktogglebutton.c',
'gtktoggletoolbutton.c',
'gtktoolbar.c',
'gtktoolbutton.c',
'gtktoolitem.c',
'gtktoolitemgroup.c',
'gtktoolpalette.c',
'gtktoolshell.c',
'gtktooltip.c',
2016-09-26 10:51:17 +00:00
'gtktooltipwindow.c',
'gtktrashmonitor.c',
'gtktreedatalist.c',
'gtktreednd.c',
'gtktreemenu.c',
'gtktreemodel.c',
'gtktreemodelfilter.c',
'gtktreemodelsort.c',
'gtktreeselection.c',
'gtktreesortable.c',
'gtktreestore.c',
'gtktreeview.c',
'gtktreeviewcolumn.c',
2016-09-26 10:51:17 +00:00
'gtkutils.c',
'gtkviewport.c',
2016-09-26 10:51:17 +00:00
'gtkvolumebutton.c',
'gtkwidget.c',
'gtkwidgetfocus.c',
'gtkwidgetpath.c',
2016-09-26 10:51:17 +00:00
'gtkwin32draw.c',
'gtkwin32theme.c',
'gtkwin32theme.c',
'gtkwindow.c',
'gtkwindowgroup.c',
2016-09-09 20:02:21 +00:00
])
2016-09-09 20:02:21 +00:00
gtk_private_type_headers = files([
2016-08-23 06:21:54 +00:00
'gtkcsstypesprivate.h',
'gtktexthandleprivate.h',
2016-09-09 20:02:21 +00:00
])
2016-08-23 06:21:54 +00:00
2016-09-26 10:51:17 +00:00
gtk_private_headers = gtk_private_type_headers + files([
2016-08-23 06:21:54 +00:00
'gtkrbtree.h',
2016-09-26 10:51:17 +00:00
'gtkrecentchooserutils.h',
2016-08-23 06:21:54 +00:00
])
2016-09-26 10:51:17 +00:00
gtk_public_headers = files([
2016-08-23 06:21:54 +00:00
'gtkaboutdialog.h',
'gtkaccelgroup.h',
'gtkaccellabel.h',
'gtkaccelmap.h',
'gtkaccessible.h',
'gtkactionable.h',
'gtkactionbar.h',
'gtkadjustment.h',
'gtkappchooser.h',
'gtkappchooserbutton.h',
'gtkappchooserdialog.h',
'gtkappchooserwidget.h',
'gtkapplication.h',
'gtkapplicationwindow.h',
'gtkaspectframe.h',
'gtkassistant.h',
'gtkbbox.h',
'gtkbin.h',
'gtkbindings.h',
'gtkborder.h',
'gtkbox.h',
'gtkbuildable.h',
2016-09-26 10:51:17 +00:00
'gtkbuilder.h',
2016-08-23 06:21:54 +00:00
'gtkbutton.h',
'gtkcalendar.h',
'gtkcellarea.h',
'gtkcellareabox.h',
2016-09-26 10:51:17 +00:00
'gtkcellareacontext.h',
2016-08-23 06:21:54 +00:00
'gtkcelleditable.h',
'gtkcelllayout.h',
'gtkcellrenderer.h',
'gtkcellrendereraccel.h',
'gtkcellrenderercombo.h',
'gtkcellrendererpixbuf.h',
'gtkcellrendererprogress.h',
'gtkcellrendererspin.h',
'gtkcellrendererspinner.h',
'gtkcellrenderertext.h',
'gtkcellrenderertoggle.h',
'gtkcellview.h',
'gtkcheckbutton.h',
'gtkcheckmenuitem.h',
'gtkclipboard.h',
'gtkcolorbutton.h',
'gtkcolorchooser.h',
'gtkcolorchooserdialog.h',
2016-09-26 10:51:17 +00:00
'gtkcolorchooserwidget.h',
2016-08-23 06:21:54 +00:00
'gtkcolorutils.h',
'gtkcombobox.h',
'gtkcomboboxtext.h',
'gtkcontainer.h',
'gtkcssprovider.h',
'gtkcsssection.h',
'gtkdebug.h',
'gtkdialog.h',
'gtkdnd.h',
'gtkdragdest.h',
'gtkdragsource.h',
'gtkdrawingarea.h',
'gtkeditable.h',
'gtkentry.h',
'gtkentrybuffer.h',
'gtkentrycompletion.h',
'gtkenums.h',
'gtkeventbox.h',
'gtkeventcontroller.h',
'gtkexpander.h',
'gtkfilechooser.h',
'gtkfilechooserbutton.h',
'gtkfilechooserdialog.h',
'gtkfilechoosernative.h',
'gtkfilechooserwidget.h',
'gtkfilefilter.h',
'gtkfixed.h',
'gtkflowbox.h',
'gtkfontbutton.h',
'gtkfontchooser.h',
'gtkfontchooserdialog.h',
'gtkfontchooserwidget.h',
'gtkframe.h',
'gtkgesture.h',
'gtkgesturedrag.h',
'gtkgesturelongpress.h',
'gtkgesturemultipress.h',
'gtkgesturepan.h',
'gtkgesturerotate.h',
'gtkgesturesingle.h',
'gtkgestureswipe.h',
'gtkgesturezoom.h',
'gtkglarea.h',
'gtkgrid.h',
'gtkheaderbar.h',
'gtkicontheme.h',
'gtkiconview.h',
'gtkimage.h',
'gtkimcontext.h',
'gtkimcontextinfo.h',
'gtkimcontextsimple.h',
'gtkimmodule.h',
'gtkimmulticontext.h',
'gtkinfobar.h',
'gtkinvisible.h',
'gtklabel.h',
'gtklayout.h',
'gtklevelbar.h',
'gtklinkbutton.h',
'gtklistbox.h',
'gtkliststore.h',
'gtklockbutton.h',
'gtkmain.h',
'gtkmenu.h',
'gtkmenubar.h',
'gtkmenubutton.h',
'gtkmenuitem.h',
'gtkmenushell.h',
'gtkmenutoolbutton.h',
'gtkmessagedialog.h',
'gtkmodelbutton.h',
'gtkmodules.h',
'gtkmountoperation.h',
'gtknativedialog.h',
'gtknotebook.h',
'gtkorientable.h',
'gtkoverlay.h',
'gtkpadcontroller.h',
'gtkpagesetup.h',
'gtkpaned.h',
'gtkpapersize.h',
'gtkplacessidebar.h',
'gtkpopover.h',
'gtkpopovermenu.h',
'gtkprintcontext.h',
'gtkprintoperation.h',
'gtkprintoperationpreview.h',
'gtkprintsettings.h',
'gtkprogressbar.h',
'gtkradiobutton.h',
'gtkradiomenuitem.h',
'gtkradiotoolbutton.h',
'gtkrange.h',
'gtkrecentchooser.h',
'gtkrecentchooserdialog.h',
'gtkrecentchoosermenu.h',
'gtkrecentchooserwidget.h',
'gtkrecentfilter.h',
'gtkrecentmanager.h',
'gtkrender.h',
'gtkrevealer.h',
'gtkscale.h',
'gtkscalebutton.h',
'gtkscrollable.h',
'gtkscrollbar.h',
'gtkscrolledwindow.h',
'gtksearchbar.h',
'gtksearchentry.h',
'gtkselection.h',
'gtkseparator.h',
'gtkseparatormenuitem.h',
'gtkseparatortoolitem.h',
'gtksettings.h',
'gtkshortcutlabel.h',
'gtkshortcutsgroup.h',
'gtkshortcutssection.h',
'gtkshortcutsshortcut.h',
'gtkshortcutswindow.h',
'gtkshow.h',
'gtksizegroup.h',
'gtksizerequest.h',
'gtksnapshot.h',
'gtkspinbutton.h',
2016-08-23 06:21:54 +00:00
'gtkspinner.h',
'gtkstack.h',
2016-09-26 10:51:17 +00:00
'gtkstacksidebar.h',
2016-08-23 06:21:54 +00:00
'gtkstackswitcher.h',
'gtkstatusbar.h',
'gtkstylecontext.h',
'gtkstyleprovider.h',
'gtkswitch.h',
'gtktestutils.h',
'gtktextbuffer.h',
'gtktextbufferrichtext.h',
'gtktextchild.h',
'gtktextdisplay.h',
'gtktextiter.h',
'gtktextmark.h',
'gtktexttag.h',
'gtktexttagtable.h',
'gtktextview.h',
'gtktogglebutton.h',
'gtktoggletoolbutton.h',
'gtktoolbar.h',
'gtktoolbutton.h',
'gtktoolitem.h',
'gtktoolitemgroup.h',
'gtktoolpalette.h',
'gtktoolshell.h',
'gtktooltip.h',
'gtktreednd.h',
'gtktreemodel.h',
'gtktreemodelfilter.h',
'gtktreemodelsort.h',
'gtktreeselection.h',
'gtktreesortable.h',
'gtktreestore.h',
'gtktreeview.h',
'gtktreeviewcolumn.h',
'gtktypes.h',
'gtkviewport.h',
'gtkvolumebutton.h',
'gtkwidget.h',
'gtkwidgetpath.h',
'gtkwindow.h',
'gtkwindowgroup.h',
'gtk-a11y.h',
'gtk-autocleanups.h',
'gtk.h',
2016-08-23 06:21:54 +00:00
])
2017-03-20 16:24:12 +00:00
install_headers(gtk_public_headers, subdir: 'gtk-4.0/gtk/')
gtk_sources = gtk_public_sources
if os_unix
gtk_unix_print_headers = [
'gtkpagesetupunixdialog.h',
'gtkprintunixdialog.h',
'gtkprinter.h',
'gtkprintjob.h',
'gtkunixprint-autocleanups.h',
'gtkunixprint.h',
]
install_headers(gtk_unix_print_headers, subdir: 'gtk-4.0/unix-print/gtk')
gtk_sources += files([
'gtkcustompaperunixdialog.c',
'gtkpagesetupunixdialog.c',
'gtkprintbackend.c',
'gtkprinter.c',
'gtkprinteroption.c',
'gtkprinteroptionset.c',
'gtkprinteroptionwidget.c',
'gtkprintjob.c',
'gtkprintoperation-unix.c',
'gtkprintoperation-portal.c',
'gtkprintunixdialog.c',
'gtksearchenginetracker.c',
])
endif
if os_win32
gtk_sources += [
'gtkprint-win32.c',
'gtkprintoperation-win32.c',
'gtkfilechoosernativewin32.c',
'gtkwin32.c',
]
if cc.has_header_symbol('windows.h', 'IPrintDialogCallback')
cdata.set('HAVE_IPRINTDIALOGCALLBACK', 1)
endif
endif
if x11_enabled
gtk_sources += ['gtkapplication-x11.c', 'gtkmountoperation-x11.c']
endif
if wayland_enabled
gtk_sources += ['gtkapplication-wayland.c']
endif
if x11_enabled or wayland_enabled
gtk_sources += ['gtkapplication-dbus.c']
endif
if win32_enabled
gtk_sources += ['gtkmountoperation-stub.c']
endif
if quartz_enabled
gtk_sources += [
'gtksearchenginequartz.c',
'gtkmountoperation-stub.c',
'gtkapplication-quartz.c',
'gtkapplication-quartz-menu.c',
'gtkfilechoosernativequartz.c',
'gtkquartz.c',
]
gtk_cargs += ['-xobjective-c'] # FIXME? maybe add_languages() instead?
endif
if not (x11_enabled or win32_enabled or quartz_enabled)
gtk_sources += ['gtkmountoperation-stub.c', ]
endif
2017-03-11 21:54:20 +00:00
gen_gtk_gresources_xml = find_program('gen-gtk-gresources-xml.py')
# FIXME: absolute path to work around meson bug with @OUTPUT@ etc. not being
# handled here, and also with the working dir from which the script is called.
# Hopefully all to be fixed in Meson 0.39
outfile = '@0@/gtk.gresources.xml'.format(meson.current_build_dir())
gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
command: [
gen_gtk_gresources_xml,
meson.current_source_dir(),
outfile
])
# Re-build the theme files if sassc is available
theme_deps = []
sassc = find_program('sassc', required: false)
if sassc.found()
sassc_opts = [ '-a', '-M', '-t', 'compact' ]
subdir('theme/Adwaita')
subdir('theme/HighContrast')
endif
gtkresources = gnome.compile_resources('gtkresources',
gtk_gresources_xml,
dependencies: theme_deps,
source_dir: [
# List in order of preference
meson.current_build_dir(),
meson.current_source_dir(),
],
c_name: '_gtk',
extra_args: '--manual-register')
2016-08-21 16:00:19 +00:00
2016-09-09 20:02:21 +00:00
gtk_x11_sources = files([
'gtkapplication-x11.c',
'gtkmountoperation-x11.c',
2016-09-09 20:02:21 +00:00
])
2016-09-09 20:02:21 +00:00
gtk_wayland_sources = files([
2016-08-21 14:00:37 +00:00
'gtkapplication-wayland.c'
2016-09-09 20:02:21 +00:00
])
gtk_use_wayland_or_x11_c_sources = files([
'gtkapplication-dbus.c'
])
if quartz_enabled
dnd_sources = files([
'gtkclipboard-quartz.c',
'gtkdnd-quartz.c',
])
else
dnd_sources = files([
'gtkclipboard.c',
'gtkdnd.c',
'gtkdragdest.c',
])
endif
gtk_dbus_src = gnome.gdbus_codegen('gtkdbusgenerated',
'gtkdbusinterfaces.xml',
interface_prefix: 'org.Gtk.',
namespace: '_Gtk')
gtkmarshalers = gnome.genmarshal('gtkmarshalers',
sources: 'gtkmarshalers.list',
prefix: '_gtk_marshal',
valist_marshallers: true)
gtkmarshal_h = gtkmarshalers[1]
gtktypebuiltins = gnome.mkenums('gtktypebuiltins',
sources: gtk_public_headers + gtk_deprecated_headers + a11y_headers,
c_template: 'gtktypebuiltins.c.template',
h_template: 'gtktypebuiltins.h.template',
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gtk'),
install_header: true)
2016-08-23 06:21:54 +00:00
gtktypebuiltins_h = gtktypebuiltins[1]
2016-08-23 06:21:54 +00:00
gtkprivatetypebuiltins = gnome.mkenums('gtkprivatetypebuiltins',
sources: gtk_private_type_headers,
c_template: 'gtkprivatetypebuiltins.c.template',
h_template: 'gtkprivatetypebuiltins.h.template')
2016-08-23 06:21:54 +00:00
gtkprivatetypebuiltins_h = gtkprivatetypebuiltins[1]
2016-08-23 06:21:54 +00:00
# Generate gtktypefuncs.inc
typefuncs = custom_target('gtktypefuncs.inc',
depends: [ gdkenum_h, gskenum_h, ],
output: 'gtktypefuncs.inc',
input: gdk_headers +
gtk_public_headers +
gtk_deprecated_headers +
gtk_private_headers +
[ gtktypebuiltins_h, ] +
[ gdkenum_h, gskenum_h, ],
command: [
find_program('gentypefuncs.py'),
'@OUTPUT@',
'@INPUT@',
],
install: false)
2016-08-23 06:21:54 +00:00
gtkversion_cdata = configuration_data()
gtkversion_cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
gtkversion_cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
gtkversion_cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
gtkversion_cdata.set('GTK_BINARY_AGE', gtk_binary_age)
gtkversion_cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
2016-08-23 06:21:54 +00:00
gtkversion = configure_file(input: 'gtkversion.h.in',
output: 'gtkversion.h',
configuration: gtkversion_cdata,
install_dir: join_paths(gtk_includedir, 'gtk-4.0/gtk'))
2016-08-23 06:21:54 +00:00
2016-09-24 08:04:23 +00:00
gtk_cargs = [
'-DGTK_COMPILATION',
'-DG_LOG_DOMAIN="Gtk"',
2016-09-24 08:04:23 +00:00
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version),
'-DGTK_HOST="@0@"'.format(host_machine.system()),
'-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix),
2016-09-24 08:04:23 +00:00
]
gtk_gen_headers = [
gtkmarshal_h,
gtktypebuiltins_h,
gtkprivatetypebuiltins_h,
gtkversion,
]
2016-09-09 20:02:21 +00:00
gtk_sources += [
gtk_dbus_src,
2016-09-26 10:51:17 +00:00
gtk_deprecated_sources,
dnd_sources,
inspector_sources,
a11y_sources,
gtkresources,
gtkmarshalers,
gtkprivatetypebuiltins,
gtktypebuiltins,
]
gtk_deps = [
2016-09-09 20:02:21 +00:00
gmodule_dep,
giounix_dep,
glib_dep,
atkbridge_dep,
pangocairo_dep,
pango_dep,
cairogobj_dep,
cairo_dep,
fontconfig_dep,
pixbuf_dep,
atk_dep,
epoxy_dep,
libm,
graphene_dep,
]
2016-09-09 20:02:21 +00:00
if x11_enabled
x11_data_prefix = dependency('x11').get_pkgconfig_variable('prefix')
2016-09-24 08:04:23 +00:00
gtk_cargs += [ '-DX11_DATA_PREFIX="@0@"'.format(x11_data_prefix), ]
2016-09-26 10:51:17 +00:00
gtk_sources += gtk_x11_sources
gtk_deps += [ xi_dep, x11_dep, ]
2016-09-09 20:02:21 +00:00
endif
if wayland_enabled
2016-09-26 10:51:17 +00:00
gtk_sources += gtk_wayland_sources
endif
# So we don't add these twice
if x11_enabled or wayland_enabled
gtk_sources += gtk_use_wayland_or_x11_c_sources
gtk_deps += pangoft_dep
endif
gtk_settings_schemas = [
'org.gtk.Settings.FileChooser.gschema.xml',
'org.gtk.Settings.ColorChooser.gschema.xml',
'org.gtk.Settings.Debug.gschema.xml',
]
install_data(gtk_settings_schemas, install_dir: gtk_schemasdir)
2016-09-24 08:43:22 +00:00
gnome.compile_schemas()
# Check for more things
if cc.has_header('langinfo.h')
foreach nl_enum: [ '_NL_MEASUREMENT_MEASUREMENT',
'_NL_PAPER_HEIGHT',
'_NL_PAPER_WIDTH',
'_NL_TIME_FIRST_WEEKDAY', ]
cdata.set('HAVE_' + nl_enum, cc.has_header_symbol('langinfo.h', nl_enum))
endforeach
endif
# Input methods
gen_headers = [ gtk_gen_headers, gsk_gen_headers, gdk_gen_headers, ]
included_input_modules = []
foreach m: inc_im_method_defs # populated in modules/input/meson.build
im_name = m[0]
im_srcs = m[1]
im_args = m[2]
im_libs = m[3]
included_input_modules += static_library('im-@0@'.format(im_name),
im_srcs, gen_headers,
c_args: im_args,
include_directories: [confinc, gdkinc, gtkinc],
dependencies: gtk_deps + im_libs)
endforeach
foreach m: dyn_im_method_defs # populated in modules/input/meson.build
im_name = m[0]
im_srcs = m[1]
im_args = m[2]
im_libs = m[3]
shared_module('im-@0@'.format(im_name), im_srcs, gen_headers,
c_args: im_args,
include_directories: [confinc, gdkinc, gtkinc],
dependencies: gtk_deps + im_libs,
name_prefix: '', # we want im-foo.so not libim-foo.so
install_dir: immodules_install_dir,
install: true)
endforeach
# Library
2017-03-22 00:15:31 +00:00
libgtk = shared_library('gtk-4',
soversion: gtk_soversion,
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
c_args: gtk_cargs + common_cflags,
include_directories: [confinc, gdkinc, gskinc, gtkinc],
dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
link_with: [libgdk, libgsk, ],
link_whole: included_input_modules,
link_args: common_ldflags,
install: true)
libgtk_dep = declare_dependency(sources: [gtkversion, gtktypebuiltins_h],
include_directories: [confinc, gtkinc],
dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
link_with: libgtk,
link_args: common_ldflags)
2016-09-24 08:43:22 +00:00
# Introspection
if not meson.is_cross_build()
gir_args = [
'--c-include=gtk/gtk.h',
'--quiet',
]
gdk_gir = gnome.generate_gir(libgtk,
sources: gdk_public_headers + gdk_public_sources + [ gdkenum_h ],
namespace: 'Gdk',
nsversion: gtk_api_version,
identifier_prefix: 'Gdk',
symbol_prefix: 'gdk',
export_packages: 'gtk+-4.0',
includes: [ 'Gio-2.0', 'GdkPixbuf-2.0', 'Pango-1.0', 'cairo-1.0', ],
install: true,
extra_args: gir_args + [
'-DGDK_COMPILATION',
])
gdk_gir_dep = declare_dependency(sources: gdk_gir)
if x11_enabled
gnome.generate_gir(libgtk,
sources: gdk_x11_public_headers + gdk_x11_sources,
namespace: 'GdkX11',
nsversion: gtk_api_version,
identifier_prefix: 'Gdk',
symbol_prefix: 'gdk',
export_packages: 'gtk+-x11-4.0',
includes: [ 'Gio-2.0', 'GdkPixbuf-2.0', 'Pango-1.0', 'xlib-2.0', ],
install: true,
dependencies: gdk_gir_dep,
extra_args: [
'--quiet',
'--c-include=gdk/gdkx.h',
'--include-uninstalled=./gtk/Gdk-4.0.gir',
'-DGDK_COMPILATION',
])
endif
gsk_gir = gnome.generate_gir(libgtk,
sources: gsk_public_headers + gsk_public_sources + [ gskenum_h ],
namespace: 'Gsk',
nsversion: gtk_api_version,
identifier_prefix: 'Gsk',
symbol_prefix: 'gsk',
export_packages: 'gtk+-4.0',
includes: [ 'Graphene-1.0', 'Gdk-4.0' ],
install: true,
dependencies: gdk_gir_dep,
extra_args: gir_args + [
'--include-uninstalled=./gtk/Gdk-4.0.gir',
'-DGSK_COMPILATION',
])
gsk_gir_dep = declare_dependency(dependencies: gdk_gir_dep, sources: gsk_gir)
gnome.generate_gir(libgtk,
sources: gtk_public_headers + gtk_public_sources + dnd_sources + a11y_headers + a11y_sources + [
gtktypebuiltins_h,
gtkversion,
],
namespace: 'Gtk',
nsversion: gtk_api_version,
identifier_prefix: 'Gtk',
symbol_prefix: 'gtk',
export_packages: 'gtk+-4.0',
includes: [ 'Atk-1.0', ],
install: true,
dependencies: gsk_gir_dep,
extra_args: gir_args + [
'--include-uninstalled=./gtk/Gdk-4.0.gir',
'--include-uninstalled=./gtk/Gsk-4.0.gir',
'-DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API',
'-DGTK_COMPILATION',
])
endif
# Installed tools
gtk_tools = [
['gtk4-query-settings', ['gtk-query-settings.c']],
['gtk4-builder-tool', ['gtk-builder-tool.c']],
['gtk4-update-icon-cache', ['updateiconcache.c']],
['gtk4-encode-symbolic-svg', ['encodesymbolic.c']],
['gtk4-launch', ['gtk-launch.c']],
['gtk4-query-immodules', ['queryimmodules.c', 'gtkutils.c']],
]
2016-09-24 08:43:22 +00:00
foreach tool: gtk_tools
tool_name = tool.get(0)
tool_srcs = tool.get(1)
2016-09-24 08:43:22 +00:00
exe = executable(tool_name, tool_srcs,
include_directories: [confinc],
c_args: gtk_cargs,
dependencies: libgtk_dep,
install: true)
set_variable(tool_name.underscorify(), exe) # used in testsuites
endforeach
# Data to install
install_data('gtkbuilder.rng',
install_dir: join_paths(gtk_datadir, 'gtk-4.0'))
install_data('gtkbuilder.loc', 'gtkbuilder.its',
install_dir: join_paths(gtk_datadir, 'gettext/its'))
if quartz_enabled
# HACK: install_data() doesn't allow installing under a different name (#1487)
# FIXME: or maybe just rename it to gtk-keys.css in the src tree?
configure_file(input: 'gtk-keys.css.mac',
output: 'gtk-keys.css',
configuration: configuration_data(),
install_dir: join_paths(get_option('datadir'), 'themes/Mac/gtk-4.0'))
endif