diff options
Diffstat (limited to 'subprojects/gfm/meson.build')
m--------- | subprojects/gfm | 0 | ||||
-rw-r--r-- | subprojects/gfm/meson.build | 85 |
2 files changed, 85 insertions, 0 deletions
diff --git a/subprojects/gfm b/subprojects/gfm deleted file mode 160000 -Subproject f53bde10101e025c83868bcbad34f7a248d0526 diff --git a/subprojects/gfm/meson.build b/subprojects/gfm/meson.build new file mode 100644 index 00000000..ab93f9cf --- /dev/null +++ b/subprojects/gfm/meson.build @@ -0,0 +1,85 @@ +project('gfm', 'c', + meson_version: '>= 0.38.0', +) + +c_args = [] +gnome = import('gnome') + +if not meson.is_subproject() + message('WARNING: This project is only intended to be used as a subproject!') +endif + +api_version = '0.1' + +gfm_sources = [ + 'gtkfilterlistmodel.c', + 'gtkflattenlistmodel.c', + 'gtkslicelistmodel.c', + 'gtksortlistmodel.c', + 'gtkrbtree.c', +] + +gfm_headers = [ + 'gtkfilterlistmodel.h', + 'gtkflattenlistmodel.h', + 'gtkslicelistmodel.h', + 'gtksortlistmodel.h', + 'gtkrbtreeprivate.h', + 'gtkintl.h', +] + +gfm_introspection_headers = [ + 'gtkfilterlistmodel.h', + 'gtkflattenlistmodel.h', + 'gtkslicelistmodel.h', + 'gtksortlistmodel.h', +] + +pkglibdir = get_option('pkglibdir') +pkgdatadir = get_option('pkgdatadir') +pkggirdir = join_paths(pkgdatadir, 'gir-1.0') +pkgtypelibdir = join_paths(pkglibdir, 'girepository-1.0') + +gfm_header_subdir = '.' +gfm_header_dir = join_paths(get_option('includedir'), gfm_header_subdir) + +cc = meson.get_compiler('c') + +gfm_deps = [ + dependency('gio-2.0', version: '>= 2.50'), + dependency('gtk+-3.0'), +] + +gfm_lib = shared_library('gfm-' + api_version, + gfm_sources, + dependencies: gfm_deps, + c_args: ['-DGETTEXT_PACKAGE', '-DGTK_COMPILATION '], + install: true, + install_dir: pkglibdir +) + +gfm_gir = gnome.generate_gir(gfm_lib, + sources: gfm_sources + gfm_introspection_headers, + nsversion: api_version, + namespace: 'Gfm', + symbol_prefix: 'gtk', + extra_args: ['-DGETTEXT_PACKAGE', '-DGTK_COMPILATION '], + identifier_prefix: 'Gtk', + link_with: gfm_lib, + includes: ['Gio-2.0', 'Gtk-3.0'], + install: true, + install_dir_gir: pkggirdir, + install_dir_typelib: pkgtypelibdir, +) + +pkg = import('pkgconfig') + +pkg.generate( + description: 'A shared library backporting a few GTK4 listmodels to GTK3', + libraries: gfm_lib, + name: 'gfm', + filebase: 'gfm-' + api_version, + version: meson.project_version(), + requires: 'glib-2.0', + install_dir: join_paths(pkglibdir, 'pkgconfig') +) |