gplugin/gplugin

closing this branch as there is no demand for this
feature/ruby-loader
16 months ago, Gary Kramlich
d44bad5e041e
closing this branch as there is no demand for this
if get_option('gtk3')
###############################################################################
# Build Info
###############################################################################
GTK3 = dependency('gtk+-3.0', version : '>=3.0.0')
GLADEUI = dependency('gladeui-2.0', version: '>=3.0.0')
GPLUGIN_GTK_LIBRARY_VERSION = '0.1.0'
GPLUGIN_GTK_SOURCES = [
'gplugin-gtk-plugin-info.c',
'gplugin-gtk-store.c',
'gplugin-gtk-view.c',
]
GPLUGIN_GTK_HEADERS = [
'gplugin-gtk-plugin-info.h',
'gplugin-gtk-store.h',
'gplugin-gtk-view.h',
]
GPLUGIN_GTK_PRIVATE_SOURCES = [
]
GPLUGIN_GTK_PRIVATE_HEADERS = [
]
GPLUGIN_GTK_PUBLIC_BUILT_SOURCES = [
]
GPLUGIN_GTK_PUBLIC_BUILT_HEADERS = [
]
###############################################################################
# Configure Files
###############################################################################
GPLUGIN_GTK_H_INCLUDES = ''
foreach header : GPLUGIN_GTK_HEADERS
GPLUGIN_GTK_H_INCLUDES = '@0@\n#include <gplugin-gtk/@1@>'.format(
GPLUGIN_GTK_H_INCLUDES,
header)
endforeach
conf = configuration_data()
conf.set('GPLUGIN_GTK_H_INCLUDES', GPLUGIN_GTK_H_INCLUDES)
gplugin_gtk_h = configure_file(
input : 'gplugin-gtk.h.in',
output : 'gplugin-gtk.h',
configuration : conf,
install : true,
install_dir : join_paths(get_option('includedir'), 'gplugin-1.0'))
gplugin_gtk_xml = configure_file(
input : 'gplugin-gtk.xml.in',
output: 'gplugin-gtk.xml',
configuration : version_conf,
install: true,
install_dir : GLADEUI.get_pkgconfig_variable('catalogdir'),
)
###############################################################################
# Library Target
###############################################################################
gplugin_gtk = shared_library('gplugin-gtk',
GPLUGIN_GTK_SOURCES,
GPLUGIN_GTK_HEADERS,
GPLUGIN_GTK_PRIVATE_SOURCES,
GPLUGIN_GTK_PRIVATE_HEADERS,
GPLUGIN_GTK_PUBLIC_BUILT_SOURCES,
GPLUGIN_GTK_PUBLIC_BUILT_HEADERS,
c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_DOMAIN="GPluginGtk"'],
include_directories : toplevel_inc,
dependencies : [gplugin_dep, GTK3],
version : GPLUGIN_GTK_LIBRARY_VERSION,
install : true
)
gplugin_gtk_inc = include_directories('.')
gplugin_gtk_dep = declare_dependency(
include_directories: [toplevel_inc, gplugin_gtk_inc],
link_with : [gplugin, gplugin_gtk],
sources : GPLUGIN_GTK_PUBLIC_BUILT_HEADERS, # Ensure they're built before use.
dependencies : [GLIB, GOBJECT, GTK3],
)
pkgconfig.generate(
name : 'libgplugin-gtk',
description : 'Gtk+ widgets for GPlugin',
version : meson.project_version(),
filebase : 'gplugin-gtk',
subdirs : 'gplugin-1.0',
libraries : gplugin_gtk,
requires : ['glib-2.0', 'gobject-2.0', 'gmodule-2.0', 'gplugin'],
variables : [
'plugindir=${libdir}',
],
)
###############################################################################
# Application Target
###############################################################################
gplugin_gtk_viewer = executable('gplugin-gtk-viewer',
'gplugin-gtk-viewer.c',
dependencies : [gplugin_dep, gplugin_gtk_dep],
install : true
)
if get_option('help2man')
gplugin_gtk_viewer_man = custom_target('gplugin-gtk-viewer.1',
command : [help2man,
'--name=View installed plugins', '--section=1',
'--help-option=--help-all', '--no-info',
'--output', '@OUTPUT@',
gplugin_gtk_viewer],
output : 'gplugin-gtk-viewer.1',
install : true,
install_dir : join_paths(get_option('mandir'), 'man1'))
endif
###############################################################################
# GObject Introspection
###############################################################################
if get_option('gobject-introspection')
gplugin_gtk_gir = gnome.generate_gir(
gplugin_gtk,
sources : GPLUGIN_GTK_SOURCES + GPLUGIN_GTK_HEADERS +
GPLUGIN_GTK_PUBLIC_BUILT_SOURCES +
GPLUGIN_GTK_PUBLIC_BUILT_HEADERS,
includes : [gplugin_gir[0], 'Gtk-3.0'],
namespace : 'GPluginGtk',
symbol_prefix : 'gplugin_gtk',
nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION),
install : true)
endif
###############################################################################
# Install Stuff
###############################################################################
# install the normal includes into the gplugin-gtk subdirectory
install_headers(
GPLUGIN_GTK_HEADERS,
subdir : 'gplugin-1.0/gplugin-gtk'
)
# install the GtkBuilder files
install_data(
'gplugin-gtk-plugin-info.ui',
install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk')
)
###############################################################################
# subdirectories
###############################################################################
if ENABLE_DOC
subdir('reference')
endif
endif # gtk3