meson.build 2.01 KB
Newer Older
tallero's avatar
tallero committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
# See https://github.com/mesonbuild/meson/issues/226
project('daty', 'c')

version = '3.35.1'

# Configuration params
conf = configuration_data()
conf.set('PACKAGE_VERSION', version)
conf.set('PACKAGE_URL', 'https://wiki.gnome.org/World/Daty')

message('Looking for dependencies')
py3 = find_program('python3')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
gir = dependency('gobject-introspection-1.0')
gmod = dependency('gmodule-2.0')
gtk = dependency('gtk+-3.0', version : '>=3.13.2')
libhandy = dependency('libhandy-0.0', version :'>=0.0.3')

message('Getting python install dir')
r = run_command(py3, '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')
if r.returncode() != 0
    error('Cannot find python install dir')
endif
python_dir = r.stdout().strip()
# 
# subdir('daty')
# subdir('po')
# subdir('help')
# 
# message('Generate libgd')
# 
# libsources = [
#     'libgd/libgd/gd-types-catalog.c', 'libgd/libgd/gd-types-catalog.h',
#     'libgd/libgd/gd-main-view-generic.c', 'libgd/libgd/gd-main-view-generic.h',
#     'libgd/libgd/gd-styled-text-renderer.c', 'libgd/libgd/gd-styled-text-renderer.h',
#     'libgd/libgd/gd-two-lines-renderer.c', 'libgd/libgd/gd-two-lines-renderer.h',
#     'libgd/libgd/gd-revealer.c', 'libgd/libgd/gd-revealer.h',
#     'libgd/libgd/gd-tagged-entry.c', 'libgd/libgd/gd-tagged-entry.h',
# ]
# 
# libgdgir = shared_library('libgd', libsources,
#     dependencies : [glib, gtk, gobject, gir, gmod])
# 
# gnome.generate_gir(
#     libgdgir,
#     sources : libsources,
#     nsversion : '1.0',
#     namespace : 'Gd',
#     symbol_prefix : 'gd_',
#     identifier_prefix : 'Gd',
#     includes : ['GObject-2.0', 'Gio-2.0', 'Gtk-3.0'],
#     install : true
# )
# 
# message('TODO: Generate authors list')
# 
install_subdir('daty', install_dir: python_dir)
# 
# message('Preparing init file')
# configure_file(input : 'gnome-music.in', output : 'gnome-music', configuration : conf)
# install_data('daty', install_dir: 'bin')
# 
# meson.set_install_script('meson_install.sh')