glib/2.78.3

Low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
Recipe info
LGPL-2.1-or-later
2023-12-07

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
glib/2.78.3

Using glib

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
glib/2.78.3
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("glib/2.78.3")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): glib
  • CMake target name(s): glib::glib
  • gio-2.0 => glib::gio-2.0
    glib-2.0 => glib::glib-2.0
    gresource => glib::gresource
    gmodule-2.0 => glib::gmodule-2.0
    gobject-2.0 => glib::gobject-2.0
    gthread-2.0 => glib::gthread-2.0
    gio-unix-2.0 => glib::gio-unix-2.0
    gmodule-export-2.0 => glib::gmodule-export-2.0
    gmodule-no-export-2.0 => glib::gmodule-no-export-2.0
    
  • pkg-config file name(s): glib.pc
  • gio-2.0 => gio-2.0.pc
    glib-2.0 => glib-2.0.pc
    gresource => gresource.pc
    gmodule-2.0 => gmodule-2.0.pc
    gobject-2.0 => gobject-2.0.pc
    gthread-2.0 => gthread-2.0.pc
    gio-unix-2.0 => gio-unix-2.0.pc
    gmodule-export-2.0 => gmodule-export-2.0.pc
    gmodule-no-export-2.0 => gmodule-no-export-2.0.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(glib REQUIRED)
# ...
target_link_libraries(YOUR_TARGET glib::glib)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the glib homepage listed above:

#include "gio-unix-2.0/gio/gdesktopappinfo.h"
#include "gio-unix-2.0/gio/gfiledescriptorbased.h"
#include "gio-unix-2.0/gio/gunixfdmessage.h"
#include "gio-unix-2.0/gio/gunixinputstream.h"
#include "gio-unix-2.0/gio/gunixmounts.h"
#include "gio-unix-2.0/gio/gunixoutputstream.h"
#include "glib-2.0/gio/gaction.h"
#include "glib-2.0/gio/gactiongroup.h"
#include "glib-2.0/gio/gactiongroupexporter.h"
#include "glib-2.0/gio/gactionmap.h"
#include "glib-2.0/gio/gappinfo.h"
#include "glib-2.0/gio/gapplication.h"
#include "glib-2.0/gio/gapplicationcommandline.h"
#include "glib-2.0/gio/gasyncinitable.h"
#include "glib-2.0/gio/gasyncresult.h"
#include "glib-2.0/gio/gbufferedinputstream.h"
#include "glib-2.0/gio/gbufferedoutputstream.h"
#include "glib-2.0/gio/gbytesicon.h"
#include "glib-2.0/gio/gcancellable.h"
#include "glib-2.0/gio/gcharsetconverter.h"
#include "glib-2.0/gio/gcontenttype.h"
#include "glib-2.0/gio/gconverter.h"
#include "glib-2.0/gio/gconverterinputstream.h"
#include "glib-2.0/gio/gconverteroutputstream.h"
#include "glib-2.0/gio/gcredentials.h"
#include "glib-2.0/gio/gdatagrambased.h"
#include "glib-2.0/gio/gdatainputstream.h"
#include "glib-2.0/gio/gdataoutputstream.h"
#include "glib-2.0/gio/gdbusactiongroup.h"
#include "glib-2.0/gio/gdbusaddress.h"
#include "glib-2.0/gio/gdbusauthobserver.h"
#include "glib-2.0/gio/gdbusconnection.h"
#include "glib-2.0/gio/gdbuserror.h"
#include "glib-2.0/gio/gdbusinterface.h"
#include "glib-2.0/gio/gdbusinterfaceskeleton.h"
#include "glib-2.0/gio/gdbusintrospection.h"
#include "glib-2.0/gio/gdbusmenumodel.h"
#include "glib-2.0/gio/gdbusmessage.h"
#include "glib-2.0/gio/gdbusmethodinvocation.h"
#include "glib-2.0/gio/gdbusnameowning.h"
#include "glib-2.0/gio/gdbusnamewatching.h"
#include "glib-2.0/gio/gdbusobject.h"
#include "glib-2.0/gio/gdbusobjectmanager.h"
#include "glib-2.0/gio/gdbusobjectmanagerclient.h"
#include "glib-2.0/gio/gdbusobjectmanagerserver.h"
#include "glib-2.0/gio/gdbusobjectproxy.h"
#include "glib-2.0/gio/gdbusobjectskeleton.h"
#include "glib-2.0/gio/gdbusproxy.h"
#include "glib-2.0/gio/gdbusserver.h"
#include "glib-2.0/gio/gdbusutils.h"
#include "glib-2.0/gio/gdebugcontroller.h"
#include "glib-2.0/gio/gdebugcontrollerdbus.h"
#include "glib-2.0/gio/gdrive.h"
#include "glib-2.0/gio/gdtlsclientconnection.h"
#include "glib-2.0/gio/gdtlsconnection.h"
#include "glib-2.0/gio/gdtlsserverconnection.h"
#include "glib-2.0/gio/gemblem.h"
#include "glib-2.0/gio/gemblemedicon.h"
#include "glib-2.0/gio/gfile.h"
#include "glib-2.0/gio/gfileattribute.h"
#include "glib-2.0/gio/gfileenumerator.h"
#include "glib-2.0/gio/gfileicon.h"
#include "glib-2.0/gio/gfileinfo.h"
#include "glib-2.0/gio/gfileinputstream.h"
#include "glib-2.0/gio/gfileiostream.h"
#include "glib-2.0/gio/gfilemonitor.h"
#include "glib-2.0/gio/gfilenamecompleter.h"
#include "glib-2.0/gio/gfileoutputstream.h"
#include "glib-2.0/gio/gfilterinputstream.h"
#include "glib-2.0/gio/gfilteroutputstream.h"
#include "glib-2.0/gio/gicon.h"
#include "glib-2.0/gio/ginetaddress.h"
#include "glib-2.0/gio/ginetaddressmask.h"
#include "glib-2.0/gio/ginetsocketaddress.h"
#include "glib-2.0/gio/ginitable.h"
#include "glib-2.0/gio/ginputstream.h"
#include "glib-2.0/gio/gio-autocleanups.h"
#include "glib-2.0/gio/gio-visibility.h"
#include "glib-2.0/gio/gio.h"
#include "glib-2.0/gio/gioenums.h"
#include "glib-2.0/gio/gioenumtypes.h"
#include "glib-2.0/gio/gioerror.h"
#include "glib-2.0/gio/giomodule.h"
#include "glib-2.0/gio/gioscheduler.h"
#include "glib-2.0/gio/giostream.h"
#include "glib-2.0/gio/giotypes.h"
#include "glib-2.0/gio/glistmodel.h"
#include "glib-2.0/gio/gliststore.h"
#include "glib-2.0/gio/gloadableicon.h"
#include "glib-2.0/gio/gmemoryinputstream.h"
#include "glib-2.0/gio/gmemorymonitor.h"
#include "glib-2.0/gio/gmemoryoutputstream.h"
#include "glib-2.0/gio/gmenu.h"
#include "glib-2.0/gio/gmenuexporter.h"
#include "glib-2.0/gio/gmenumodel.h"
#include "glib-2.0/gio/gmount.h"
#include "glib-2.0/gio/gmountoperation.h"
#include "glib-2.0/gio/gnativesocketaddress.h"
#include "glib-2.0/gio/gnativevolumemonitor.h"
#include "glib-2.0/gio/gnetworkaddress.h"
#include "glib-2.0/gio/gnetworking.h"
#include "glib-2.0/gio/gnetworkmonitor.h"
#include "glib-2.0/gio/gnetworkservice.h"
#include "glib-2.0/gio/gnotification.h"
#include "glib-2.0/gio/goutputstream.h"
#include "glib-2.0/gio/gpermission.h"
#include "glib-2.0/gio/gpollableinputstream.h"
#include "glib-2.0/gio/gpollableoutputstream.h"
#include "glib-2.0/gio/gpollableutils.h"
#include "glib-2.0/gio/gpowerprofilemonitor.h"
#include "glib-2.0/gio/gpropertyaction.h"
#include "glib-2.0/gio/gproxy.h"
#include "glib-2.0/gio/gproxyaddress.h"
#include "glib-2.0/gio/gproxyaddressenumerator.h"
#include "glib-2.0/gio/gproxyresolver.h"
#include "glib-2.0/gio/gremoteactiongroup.h"
#include "glib-2.0/gio/gresolver.h"
#include "glib-2.0/gio/gresource.h"
#include "glib-2.0/gio/gseekable.h"
#include "glib-2.0/gio/gsettings.h"
#include "glib-2.0/gio/gsettingsbackend.h"
#include "glib-2.0/gio/gsettingsschema.h"
#include "glib-2.0/gio/gsimpleaction.h"
#include "glib-2.0/gio/gsimpleactiongroup.h"
#include "glib-2.0/gio/gsimpleasyncresult.h"
#include "glib-2.0/gio/gsimpleiostream.h"
#include "glib-2.0/gio/gsimplepermission.h"
#include "glib-2.0/gio/gsimpleproxyresolver.h"
#include "glib-2.0/gio/gsocket.h"
#include "glib-2.0/gio/gsocketaddress.h"
#include "glib-2.0/gio/gsocketaddressenumerator.h"
#include "glib-2.0/gio/gsocketclient.h"
#include "glib-2.0/gio/gsocketconnectable.h"
#include "glib-2.0/gio/gsocketconnection.h"
#include "glib-2.0/gio/gsocketcontrolmessage.h"
#include "glib-2.0/gio/gsocketlistener.h"
#include "glib-2.0/gio/gsocketservice.h"
#include "glib-2.0/gio/gsrvtarget.h"
#include "glib-2.0/gio/gsubprocess.h"
#include "glib-2.0/gio/gsubprocesslauncher.h"
#include "glib-2.0/gio/gtask.h"
#include "glib-2.0/gio/gtcpconnection.h"
#include "glib-2.0/gio/gtcpwrapperconnection.h"
#include "glib-2.0/gio/gtestdbus.h"
#include "glib-2.0/gio/gthemedicon.h"
#include "glib-2.0/gio/gthreadedsocketservice.h"
#include "glib-2.0/gio/gtlsbackend.h"
#include "glib-2.0/gio/gtlscertificate.h"
#include "glib-2.0/gio/gtlsclientconnection.h"
#include "glib-2.0/gio/gtlsconnection.h"
#include "glib-2.0/gio/gtlsdatabase.h"
#include "glib-2.0/gio/gtlsfiledatabase.h"
#include "glib-2.0/gio/gtlsinteraction.h"
#include "glib-2.0/gio/gtlspassword.h"
#include "glib-2.0/gio/gtlsserverconnection.h"
#include "glib-2.0/gio/gunixconnection.h"
#include "glib-2.0/gio/gunixcredentialsmessage.h"
#include "glib-2.0/gio/gunixfdlist.h"
#include "glib-2.0/gio/gunixsocketaddress.h"
#include "glib-2.0/gio/gvfs.h"
#include "glib-2.0/gio/gvolume.h"
#include "glib-2.0/gio/gvolumemonitor.h"
#include "glib-2.0/gio/gzlibcompressor.h"
#include "glib-2.0/gio/gzlibdecompressor.h"
#include "glib-2.0/glib-object.h"
#include "glib-2.0/glib-unix.h"
#include "glib-2.0/glib.h"
#include "glib-2.0/glib/deprecated/gallocator.h"
#include "glib-2.0/glib/deprecated/gcache.h"
#include "glib-2.0/glib/deprecated/gcompletion.h"
#include "glib-2.0/glib/deprecated/gmain.h"
#include "glib-2.0/glib/deprecated/grel.h"
#include "glib-2.0/glib/deprecated/gthread.h"
#include "glib-2.0/glib/galloca.h"
#include "glib-2.0/glib/garray.h"
#include "glib-2.0/glib/gasyncqueue.h"
#include "glib-2.0/glib/gatomic.h"
#include "glib-2.0/glib/gbacktrace.h"
#include "glib-2.0/glib/gbase64.h"
#include "glib-2.0/glib/gbitlock.h"
#include "glib-2.0/glib/gbookmarkfile.h"
#include "glib-2.0/glib/gbytes.h"
#include "glib-2.0/glib/gcharset.h"
#include "glib-2.0/glib/gchecksum.h"
#include "glib-2.0/glib/gconvert.h"
#include "glib-2.0/glib/gdataset.h"
#include "glib-2.0/glib/gdate.h"
#include "glib-2.0/glib/gdatetime.h"
#include "glib-2.0/glib/gdir.h"
#include "glib-2.0/glib/genviron.h"
#include "glib-2.0/glib/gerror.h"
#include "glib-2.0/glib/gfileutils.h"
#include "glib-2.0/glib/ggettext.h"
#include "glib-2.0/glib/ghash.h"
#include "glib-2.0/glib/ghmac.h"
#include "glib-2.0/glib/ghook.h"
#include "glib-2.0/glib/ghostutils.h"
#include "glib-2.0/glib/gi18n-lib.h"
#include "glib-2.0/glib/gi18n.h"
#include "glib-2.0/glib/giochannel.h"
#include "glib-2.0/glib/gkeyfile.h"
#include "glib-2.0/glib/glib-autocleanups.h"
#include "glib-2.0/glib/glib-typeof.h"
#include "glib-2.0/glib/glib-visibility.h"
#include "glib-2.0/glib/glist.h"
#include "glib-2.0/glib/gmacros.h"
#include "glib-2.0/glib/gmain.h"
#include "glib-2.0/glib/gmappedfile.h"
#include "glib-2.0/glib/gmarkup.h"
#include "glib-2.0/glib/gmem.h"
#include "glib-2.0/glib/gmessages.h"
#include "glib-2.0/glib/gnode.h"
#include "glib-2.0/glib/goption.h"
#include "glib-2.0/glib/gpathbuf.h"
#include "glib-2.0/glib/gpattern.h"
#include "glib-2.0/glib/gpoll.h"
#include "glib-2.0/glib/gprimes.h"
#include "glib-2.0/glib/gprintf.h"
#include "glib-2.0/glib/gqsort.h"
#include "glib-2.0/glib/gquark.h"
#include "glib-2.0/glib/gqueue.h"
#include "glib-2.0/glib/grand.h"
#include "glib-2.0/glib/grcbox.h"
#include "glib-2.0/glib/grefcount.h"
#include "glib-2.0/glib/grefstring.h"
#include "glib-2.0/glib/gregex.h"
#include "glib-2.0/glib/gscanner.h"
#include "glib-2.0/glib/gsequence.h"
#include "glib-2.0/glib/gshell.h"
#include "glib-2.0/glib/gslice.h"
#include "glib-2.0/glib/gslist.h"
#include "glib-2.0/glib/gspawn.h"
#include "glib-2.0/glib/gstdio.h"
#include "glib-2.0/glib/gstrfuncs.h"
#include "glib-2.0/glib/gstring.h"
#include "glib-2.0/glib/gstringchunk.h"
#include "glib-2.0/glib/gstrvbuilder.h"
#include "glib-2.0/glib/gtestutils.h"
#include "glib-2.0/glib/gthread.h"
#include "glib-2.0/glib/gthreadpool.h"
#include "glib-2.0/glib/gtimer.h"
#include "glib-2.0/glib/gtimezone.h"
#include "glib-2.0/glib/gtrashstack.h"
#include "glib-2.0/glib/gtree.h"
#include "glib-2.0/glib/gtypes.h"
#include "glib-2.0/glib/gunicode.h"
#include "glib-2.0/glib/guri.h"
#include "glib-2.0/glib/gutils.h"
#include "glib-2.0/glib/guuid.h"
#include "glib-2.0/glib/gvariant.h"
#include "glib-2.0/glib/gvarianttype.h"
#include "glib-2.0/glib/gversion.h"
#include "glib-2.0/glib/gversionmacros.h"
#include "glib-2.0/glib/gwin32.h"
#include "glib-2.0/gmodule.h"
#include "glib-2.0/gmodule/gmodule-visibility.h"
#include "glib-2.0/gobject/gbinding.h"
#include "glib-2.0/gobject/gbindinggroup.h"
#include "glib-2.0/gobject/gboxed.h"
#include "glib-2.0/gobject/gclosure.h"
#include "glib-2.0/gobject/genums.h"
#include "glib-2.0/gobject/glib-enumtypes.h"
#include "glib-2.0/gobject/glib-types.h"
#include "glib-2.0/gobject/gmarshal.h"
#include "glib-2.0/gobject/gobject-autocleanups.h"
#include "glib-2.0/gobject/gobject-visibility.h"
#include "glib-2.0/gobject/gobject.h"
#include "glib-2.0/gobject/gobjectnotifyqueue.c"
#include "glib-2.0/gobject/gparam.h"
#include "glib-2.0/gobject/gparamspecs.h"
#include "glib-2.0/gobject/gsignal.h"
#include "glib-2.0/gobject/gsignalgroup.h"
#include "glib-2.0/gobject/gsourceclosure.h"
#include "glib-2.0/gobject/gtype.h"
#include "glib-2.0/gobject/gtypemodule.h"
#include "glib-2.0/gobject/gtypeplugin.h"
#include "glib-2.0/gobject/gvalue.h"
#include "glib-2.0/gobject/gvaluearray.h"
#include "glib-2.0/gobject/gvaluecollector.h"
#include "glib-2.0/gobject/gvaluetypes.h"