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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
# Unlike other enums file, we don't use the mkenums_wrap because this
# one is not versioned 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.
gimpthumbenums = custom_target('gimpthumb-enums.c',
input : [ 'gimpthumb-enums.h', ],
output: [ 'gimpthumb-enums.c', ],
command: [
gimp_mkenums,
'--fhead','#include "config.h"\n'+
'#include <glib-object.h>\n'+
'#include "gimpthumb-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,
)
libgimpthumb_sources_introspectable = files(
'gimpthumb-error.c',
'gimpthumb-utils.c',
'gimpthumbnail.c',
)
libgimpthumb_sources = [
libgimpthumb_sources_introspectable,
gimpthumbenums,
]
libgimpthumb_headers_introspectable = files(
'gimpthumb-enums.h',
'gimpthumb-error.h',
'gimpthumb-types.h',
'gimpthumb-utils.h',
'gimpthumbnail.h',
)
libgimpthumb_headers = [
libgimpthumb_headers_introspectable,
'gimpthumb.h',
]
libgimpthumb_introspectable = [
libgimpthumb_sources_introspectable,
libgimpthumb_headers_introspectable,
]
libgimpthumb = library('gimpthumb-'+ gimp_api_version,
libgimpthumb_sources,
include_directories: rootInclude,
dependencies: [
gegl, glib, gobject, gdk_pixbuf, gio,
],
c_args: [ '-DG_LOG_DOMAIN="LibGimpThumb"', '-DGIMP_THUMB_COMPILATION', ],
link_with: [
libgimpbase,
],
vs_module_defs: 'gimpthumb.def',
install: true,
version: so_version,
)
install_headers(
libgimpthumb_headers,
subdir: gimp_api_name / 'libgimpthumb',
)
# Test program, not installed
gimp_thumbnail_list = executable('gimp-thumbnail-list',
'gimp-thumbnail-list.c',
include_directories: rootInclude,
dependencies: [
gdk_pixbuf,
],
c_args: '-DG_LOG_DOMAIN="LibGimpThumb"',
link_with: [
libgimpbase,
libgimpthumb,
],
install: false,
)
|