PIKApp/libpikathumb/meson.build

99 lines
2.5 KiB
Meson

# Unlike other enums file, we don't use the mkenums_wrap because this
# one is not versionned in the repository (not sure why). Moreover the
# options are quite different from the other generated enums, so it
# didn't make sense to overdo it.
pikathumbenums = custom_target('pikathumb-enums.c',
input : [ 'pikathumb-enums.h', ],
output: [ 'pikathumb-enums.c', ],
command: [
pika_mkenums,
'--fhead','#include "config.h"\n'+
'#include <glib-object.h>\n'+
'#include "pikathumb-enums.h"\n',
'--fprod','/* enumerations from "@filename@" */',
'--vhead','GType\n'+
'@enum_name@_get_type (void)\n'+
'{\n'+
' static const G@Type@Value values[] =\n'+
' {',
'--vprod',' { @VALUENAME@, @valuedesc@, "@valuenick@" },',
'--vtail',' { 0, NULL, NULL }\n'+
' };\n'+
'\n'+
' static GType type = 0;\n'+
'\n'+
' if (G_UNLIKELY (! type))\n'+
' type = g_@type@_register_static ("@EnumName@", values);\n'+
'\n'+
' return type;\n'+
'}\n',
'@INPUT@',
],
capture: true,
)
libpikathumb_sources_introspectable = files(
'pikathumb-error.c',
'pikathumb-utils.c',
'pikathumbnail.c',
)
libpikathumb_sources = [
libpikathumb_sources_introspectable,
pikathumbenums,
]
libpikathumb_headers_introspectable = files(
'pikathumb-enums.h',
'pikathumb-error.h',
'pikathumb-types.h',
'pikathumb-utils.h',
'pikathumbnail.h',
)
libpikathumb_headers = [
libpikathumb_headers_introspectable,
'pikathumb.h',
]
libpikathumb_introspectable = [
libpikathumb_sources_introspectable,
libpikathumb_headers_introspectable,
]
libpikathumb = library('pikathumb-'+ pika_api_version,
libpikathumb_sources,
include_directories: rootInclude,
dependencies: [
glib, gobject, gdk_pixbuf, gio,
],
c_args: [ '-DG_LOG_DOMAIN="LibPikaThumb"', '-DPIKA_THUMB_COMPILATION', ],
link_with: [
libpikabase,
],
vs_module_defs: 'pikathumb.def',
install: true,
version: so_version,
)
install_headers(
libpikathumb_headers,
subdir: pika_api_name / 'libpikathumb',
)
# Test program, not installed
pika_thumbnail_list = executable('pika-thumbnail-list',
'pika-thumbnail-list.c',
include_directories: rootInclude,
dependencies: [
gdk_pixbuf,
],
c_args: '-DG_LOG_DOMAIN="LibPikaThumb"',
link_with: [
libpikabase,
libpikathumb,
],
install: false,
)