Skip to content

Commit

Permalink
Add enum and thumbnailer build
Browse files Browse the repository at this point in the history
  • Loading branch information
whs authored and raveit65 committed Apr 20, 2023
1 parent 06de02a commit faf2001
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 14 deletions.
13 changes: 13 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ gsettings_schema = configure_file(input: 'org.mate.eom.gschema.xml.in', configur
install_data(gsettings_schema, install_dir: schemadir)
gnome.post_install(glib_compile_schemas: true)

gnome.mkenums(
'org.mate.eom.enums.xml',
comments: '<!-- @comment@ -->',
sources: enum_headers,
fhead: '<schemalist>',
vhead: ''' <@type@ id='org.mate.eom.@EnumName@'>''',
vprod: ''' <value nick='@valuenick@' value='@valuenum@'/>''',
vtail: ' </@type@>',
ftail: '</schemalist>',
install_header: true,
install_dir: schemadir
)

eom_pc = configure_file(input: 'eom.pc.in', configuration: pkg_info, output: 'eom.pc')
install_data(eom_pc, install_dir: libdir / 'pkgconfig')

Expand Down
9 changes: 7 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,20 @@ endif

if get_option('thumbnailer')
if get_option('gdk-pixbuf-thumbnailer')
eom_thumbnailer = find_program('gdk-pixbuf-thumbnailer')
eom_thumbnailer = find_program('gdk-pixbuf-thumbnailer').full_path()
else
magick = dependency('MagickWand', version : '>= 6.2.6')
if magick.version().version_compare('>= 7')
conf.set('HAVE_IMAGEMAGICK7', 1)
else
conf.set('HAVE_IMAGEMAGICK6', 1)
endif
#all_deps += [magick]
eom_thumbnailer = 'eom-thumbnailer'
endif
endif

pkg_info.set('EOM_THUMBNAILER', eom_thumbnailer)

# XMP support
if xmp.found()
conf.set('HAVE_EXEMPI', 1)
Expand Down Expand Up @@ -204,4 +205,8 @@ subdir('help')
subdir('data')
subdir('doc')

if get_option('thumbnailer')
subdir('thumbnailer')
endif

# TODO: Changelog
29 changes: 17 additions & 12 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resources = gnome.compile_resources(

marshal = gnome.genmarshal('eom-marshal', sources: ['eom-marshal.list'], prefix: 'eom_marshal')

inst_headers = [
inst_headers = files(
'eom-application.h',
'eom-application-activatable.h',
'eom-debug.h',
Expand All @@ -30,9 +30,9 @@ inst_headers = [
'eom-job-queue.h',
'eom-clipboard-handler.h',
'eom-jobs.h',
]
)

noinst_headers = [
noinst_headers = files(
'eom-application-internal.h',
'eom-session.h',
'eom-util.h',
Expand All @@ -53,11 +53,16 @@ noinst_headers = [
'eom-plugin-engine.h',
'eom-close-confirmation-dialog.h',
'zoom.h',
]
)

enum = gnome.mkenums('eom-enum-types', c_template: 'eom-enum-types.c.template', h_template: 'eom-enum-types.h.template', sources: inst_headers)

c_sources = [
enum_headers = files(
'eom-scroll-view.h',
'eom-window.h',
)

c_sources = files(
'eom-application.c',
'eom-application-activatable.c',
'eom-session.c',
Expand Down Expand Up @@ -96,7 +101,7 @@ c_sources = [
'eom-plugin-engine.c',
'eom-clipboard-handler.c',
'zoom.c',
]
)

libeom_src = [
c_sources,
Expand All @@ -108,17 +113,17 @@ libeom_src = [
]

if exif.found()
inst_headers += ['eom-exif-util.h']
noinst_headers += ['eom-metadata-details.h']
libeom_src += [
inst_headers += files('eom-exif-util.h')
noinst_headers += files('eom-metadata-details.h')
libeom_src += files(
'eom-metadata-details.c',
'eom-exif-util.c',
]
)
endif

if xmp.found()
noinst_headers += ['eom-metadata-details.h']
libeom_src += ['eom-metadata-details.c']
noinst_headers += files('eom-metadata-details.h')
libeom_src += files('eom-metadata-details.c')
endif

cflags = [
Expand Down
15 changes: 15 additions & 0 deletions thumbnailer/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if not get_option('gdk-pixbuf-thumbnailer')
thumbnailer = executable(
'eom-thumbnailer',
sources: [
'eom-thumbnailer.c',
],
dependencies: [all_deps, magick],
include_directories: top_inc,
install: true,
)
endif

thumbnailerdir = datadir / 'thumbnailers'
thumbnailerfile = configure_file(input: 'eom-thumbnailer.thumbnailer.in', configuration: pkg_info, output: 'eom-thumbnailer.thumbnailer')
install_data(thumbnailerfile, install_dir: thumbnailerdir)

0 comments on commit faf2001

Please sign in to comment.