[gimp/meson: 5/127] Successful build of libgimp*



commit e584870c925e93a8a8acd4b586d511836552ce3b
Author: Félix Piédallu <felix piedallu me>
Date:   Tue Nov 7 16:26:29 2017 +0100

    Successful build of libgimp*

 libgimp/meson.build        |   39 +++++++++++
 libgimpbase/meson.build    |  123 +++++++----------------------------
 libgimpcolor/meson.build   |   77 +++++++++++++++++++++-
 libgimpconfig/meson.build  |   70 +++++++++++++++++++-
 libgimpmath/meson.build    |   52 +++++++++++++++
 libgimpmodule/meson.build  |   54 +++++++++++++++-
 libgimpthumb/meson.build   |   75 +++++++++++++++++++++-
 libgimpwidgets/meson.build |  155 ++++++++++++++++++++++++++++++++++++++++++--
 meson.build                |   14 ++--
 9 files changed, 543 insertions(+), 116 deletions(-)
---
diff --git a/libgimp/meson.build b/libgimp/meson.build
index 9e3f066..b6b7087 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -1,4 +1,42 @@
 
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+  '-DPREFIX="'+ prefix + '"',
+  '-DGIMPDIR="'+ gimpdir + '"',
+  '-DDATADIR="'+ datadir + '"',
+  '-DLOCALEDIR="'+ localedir + '"',
+  '-DPLUGINDIR="'+ plugindir + '"',
+  '-DSYSCONFDIR="'+ sysconfdir + '"',
+  '-DGIMP_PACKAGE="'+ gettext_package + '"',
+  '-DGIMP_DATA_VERSION="'+ data_version + '"',
+  '-DGIMP_USER_VERSION="'+ user_version + '"',
+  '-DGIMP_SYSCONF_VERSION="'+ sysconf_version + '"',
+  '-DGIMP_PLUGIN_VERSION="'+ plugin_version + '"',
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  global_lflags += '-lexchndl'
+  # global_lflags += ['-export-symbols', 'gimp.def']
+  # global_lflags += ['-export-symbols', 'gimpui.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimp' + '"',
+  '-DGIMP_COMPILATION',
+]
+
 libgimp_sources = [
   'gimp_pdb.c',
   'gimp.c',
@@ -109,3 +147,4 @@ libgimp_sources = [
   'gimpvectors.c',
   'gimpzoompreview.c',
 ]
+
diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build
index 525afef..0be1e83 100644
--- a/libgimpbase/meson.build
+++ b/libgimpbase/meson.build
@@ -2,8 +2,6 @@
 global_cflags = []
 global_lflags = []
 
-
-
 global_cflags += [
   '-DPREFIX="'+ prefix + '"',
   '-DGIMPDIR="'+ gimpdir + '"',
@@ -16,8 +14,6 @@ global_cflags += [
   '-DGIMP_USER_VERSION="'+ user_version + '"',
   '-DGIMP_SYSCONF_VERSION="'+ sysconf_version + '"',
   '-DGIMP_PLUGIN_VERSION="'+ plugin_version + '"',
-  '-DG_LOG_DOMAIN="'+ 'LibGimpBase' + '"',
-  '-DGIMP_BASE_COMPILATION',
 ]
 
 
@@ -35,99 +31,11 @@ if os_win32
   # global_lflags += ['-export-symbols', 'gimpbase.def']
 endif
 
-#  $(GIO_CFLAGS)                                               \
-# $(GEXIV2_CFLAGS)                                     \
-# $(BINRELOC_CFLAGS)                                   \
-# $(xobjective_c)
-#
-# AM_CCASFLAGS = \
-# -I$(top_builddir)    \
-# -I$(top_srcdir)
-#
-# ]
-#
-# #
-# # test programs, not to be built by default and never installed
-# #
-#
-# TESTS = test-cpu-accel
-#
-# test_cpu_accel_SOURCES = test-cpu-accel.c
-#
-# test_cpu_accel_DEPENDENCIES = \
-#      $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
-#
-# test_cpu_accel_LDADD = \
-#      $(GLIB_LIBS)    \
-#      $(test_cpu_accel_DEPENDENCIES)
-#
-#
-# EXTRA_PROGRAMS = test-cpu-accel
-#
-#
-# #
-# # rules to generate built sources
-# #
-#
-# gen_sources = xgen-bec xgen-cec
-# CLEANFILES = $(EXTRA_PROGRAMS) $(gen_sources)
-#
-# xgen-bec: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) Makefile.am
-#      $(AM_V_GEN) $(GIMP_MKENUMS) \
-#              --fhead "#include \"config.h\"\n#include <glib-object.h>\n#undef 
GIMP_DISABLE_DEPRECATED\n#include \"gimpbasetypes.h\"\n#include \"libgimp/libgimp-intl.h\"" \
-#              --fprod "\n/* enumerations from \"@basename@\" */" \
-#              --vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
-#              --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
-#              --vtail "    { 0, NULL, NULL }\n  };\n" \
-#              --dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
-#              --dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-#              --dtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (G_UNLIKELY (! 
type))\n    {\n      type = g_@type@_register_static (\"@EnumName@\", values);\n      
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n      
gimp_type_set_translation_context (type, \"@enumnick@\");\n      gimp_@type@_set_value_descriptions (type, 
descs);\n    }\n\n  return type;\n}\n" \
-#              $< > $@
-#
-# # copy the generated enum file back to the source directory only if it's
-# # changed; otherwise, only update its timestamp, so that the recipe isn't
-# # executed again on the next build, however, allow this to (harmlessly) fail,
-# # to support building from a read-only source tree.
-# $(srcdir)/gimpbaseenums.c: xgen-bec
-#      $(AM_V_GEN) if ! cmp -s $< $@; then \
-#              cp $< $@; \
-#      else \
-#              touch $@ 2> /dev/null \
-#              || true; \
-#      fi
-#
-# xgen-cec: $(srcdir)/gimpcompatenums.h $(GIMP_MKENUMS) Makefile.am
-#      $(AM_V_GEN) $(GIMP_MKENUMS) \
-#              --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include 
\"gimpbasetypes.h\"\n#include \"gimpcompatenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
-#              --fprod "\n/* enumerations from \"@basename@\" */" \
-#              --vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
-#              --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
-#              --vtail "    { 0, NULL, NULL }\n  };\n" \
-#              --dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
-#              --dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-#              --dtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (G_UNLIKELY (! 
type))\n    {\n      type = g_@type@_register_static (\"@EnumName@\", values);\n      
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n      
gimp_type_set_translation_context (type, \"@enumnick@\");\n      gimp_@type@_set_value_descriptions (type, 
descs);\n    }\n\n  return type;\n}\n" \
-#              $< > $@
-#
-# # copy the generated enum file back to the source directory only if it's
-# # changed; otherwise, only update its timestamp, so that the recipe isn't
-# # executed again on the next build, however, allow this to (harmlessly) fail,
-# # to support building from a read-only source tree.
-# $(srcdir)/gimpcompatenums.c: xgen-cec
-#      $(AM_V_GEN) if ! cmp -s $< $@; then \
-#              cp $< $@; \
-#      else \
-#              touch $@ 2> /dev/null \
-#              || true; \
-#      fi
-#
-# DISTCLEANFILES = gimpversion.h
-
-
-
-
-
-
 
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpBase' + '"',
+  '-DGIMP_BASE_COMPILATION',
+]
 
 libgimpbase_sources = [
   'gimpbase-private.c',
@@ -150,9 +58,9 @@ libgimpbase_sources = [
   'gimputils.c',
   'gimpvaluearray.c',
   'gimpwire.c',
-  'test-cpu-accel.c',
 ]
 
+# TODO add auto-generation targets for those files
 libgimpbase_sources += [
   'gimpbaseenums.c',
   'gimpcompatenums.c',
@@ -185,11 +93,28 @@ libgimpbase_headers = [
 
 libgimpbase = library('gimpbase-' + api_version,
   libgimpbase_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gio, gexiv2, math,
+  ],
+  c_args: global_cflags,
+  link_with: global_lflags,
+)
+
+install_headers(
+  libgimpbase_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpbase'),
+)
+
 
+# test programs, not to be built by default and never installed
+test_cpu_accel = executable('test-cpu-accel',
+  'test-cpu-accel.c',
   include_directories: rootInclude,
   dependencies: [
-    gio, gexiv2,
+    glib,
   ],
   c_args: global_cflags,
-  link_args: global_lflags,
+  link_with: libgimpbase,
+  install: false,
 )
diff --git a/libgimpcolor/meson.build b/libgimpcolor/meson.build
index 4b70458..02d1fa2 100644
--- a/libgimpcolor/meson.build
+++ b/libgimpcolor/meson.build
@@ -1,3 +1,33 @@
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += '-lole32'
+  # global_lflags += ['-export-symbols', 'gimpbase.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpColor' + '"',
+  '-DGIMP_COLOR_COMPILATION',
+]
+
+
+
+
 libgimpcolor_sources = [
   'gimpadaptivesupersample.c',
   'gimpbilinear.c',
@@ -12,5 +42,50 @@ libgimpcolor_sources = [
   'gimppixbuf.c',
   'gimprgb-parse.c',
   'gimprgb.c',
+]
+
+libgimpcolor_headers = [
+  'gimpcolor.h',
+  'gimpcolortypes.h',
+  'gimpadaptivesupersample.h',
+  'gimpbilinear.h',
+  'gimpcairo.h',
+  'gimpcmyk.h',
+  'gimpcolormanaged.h',
+  'gimpcolorprofile.h',
+  'gimpcolorspace.h',
+  'gimpcolortransform.h',
+  'gimphsl.h',
+  'gimphsv.h',
+  'gimppixbuf.h',
+  'gimprgb.h',
+]
+
+
+libgimpcolor = library('gimpcolor-'+ api_version,
+  libgimpcolor_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    cairo, gdk_pixbuf, gegl, lcms, math,
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, ],
+)
+
+install_headers(
+  libgimpcolor_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpcolor'),
+)
+
+
+# test programs, not to be built by default and never installed
+test_color_parser = executable('test-color-parser',
   'test-color-parser.c',
-]
\ No newline at end of file
+  include_directories: rootInclude,
+  dependencies: [
+    babl, cairo, gdk_pixbuf, gegl, glib,
+  ],
+  c_args: global_cflags,
+  link_with: libgimpcolor,
+  install: false,
+)
diff --git a/libgimpconfig/meson.build b/libgimpconfig/meson.build
index fd0fe20..e7eb122 100644
--- a/libgimpconfig/meson.build
+++ b/libgimpconfig/meson.build
@@ -1,4 +1,33 @@
-ilbgimpconfig_sources = [
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += ['-export-symbols', 'gimpconfig.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpConfig' + '"',
+  '-DGIMP_CONFIG_COMPILATION',
+]
+
+
+
+
+libgimpconfig_sources = [
   'gimpcolorconfig.c',
   'gimpconfig-deserialize.c',
   'gimpconfig-error.c',
@@ -9,4 +38,41 @@ ilbgimpconfig_sources = [
   'gimpconfigenums.c',
   'gimpconfigwriter.c',
   'gimpscanner.c',
-]
\ No newline at end of file
+]
+
+libgimpconfig_sources += [
+  'gimpconfigenums.c',
+]
+
+
+libgimpconfig_headers = [
+  'gimpcolorconfig.h',
+  'gimpconfig-deserialize.h',
+  'gimpconfig-error.h',
+  'gimpconfig-iface.h',
+  'gimpconfig-params.h',
+  'gimpconfig-path.h',
+  'gimpconfig-serialize.h',
+  'gimpconfig-utils.h',
+  'gimpconfig.h',
+  'gimpconfigenums.h',
+  'gimpconfigtypes.h',
+  'gimpconfigwriter.h',
+  'gimpscanner.h',
+]
+
+
+libgimpconfig = library('gimpconfig-'+ api_version,
+  libgimpconfig_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    cairo, gdk_pixbuf, gegl, gio, gio_specific,
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, libgimpcolor, libgimpmath, ],
+)
+
+install_headers(
+  libgimpconfig_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpconfig'),
+)
diff --git a/libgimpmath/meson.build b/libgimpmath/meson.build
index cfeb8e6..285f9bc 100644
--- a/libgimpmath/meson.build
+++ b/libgimpmath/meson.build
@@ -1,5 +1,57 @@
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += ['-export-symbols', 'gimpmath.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpMath' + '"',
+  '-DGIMP_MATH_COMPILATION',
+]
+
+
+
 libgimpmath_sources = [
   'gimpmatrix.c',
   'gimpmd5.c',
   'gimpvector.c',
 ]
+
+libgimpmath_headers = [
+  'gimpmath.h',
+  'gimpmathtypes.h',
+  'gimpmatrix.h',
+  'gimpmd5.h',
+  'gimpvector.h',
+]
+
+
+libgimpmath = library('gimpmath-'+ api_version,
+  libgimpmath_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    glib, gobject, math,
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, ],
+)
+
+install_headers(
+  libgimpmath_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpmath'),
+)
diff --git a/libgimpmodule/meson.build b/libgimpmodule/meson.build
index 662de84..9f7fd3e 100644
--- a/libgimpmodule/meson.build
+++ b/libgimpmodule/meson.build
@@ -1,4 +1,56 @@
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += ['-export-symbols', 'gimpmodule.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpModule' + '"',
+  '-DGIMP_MODULE_COMPILATION',
+]
+
+
+
 libgimpmodule_sources = [
   'gimpmodule.c',
   'gimpmoduledb.c',
-]
\ No newline at end of file
+]
+
+libgimpmodule_headers = [
+  'gimpmodule.h',
+  'gimpmoduledb.h',
+  'gimpmoduletypes.h',
+]
+
+
+libgimpmodule = library('gimpmodule-'+ api_version,
+  libgimpmodule_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gio, glib, gmodule,
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, libgimpconfig, ],
+)
+
+install_headers(
+  libgimpmodule_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpmodule'),
+)
+
+
diff --git a/libgimpthumb/meson.build b/libgimpthumb/meson.build
index b668c7f..bd643b6 100644
--- a/libgimpthumb/meson.build
+++ b/libgimpthumb/meson.build
@@ -1,6 +1,77 @@
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += ['-export-symbols', 'gimpmath.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpThumb' + '"',
+  '-DGIMP_THUMB_COMPILATION',
+]
+
+
+
 libgimpthumb_sources = [
-  'gimp-thumbnail-list.c',
   'gimpthumb-error.c',
   'gimpthumb-utils.c',
   'gimpthumbnail.c',
-]
\ No newline at end of file
+]
+
+# TODO mkenums
+libgimpthumb_sources += [
+  'gimpthumb-enums.c',
+]
+
+
+libgimpthumb_headers = [
+  'gimpthumb-enums.h',
+  'gimpthumb-error.h',
+  'gimpthumb-types.h',
+  'gimpthumb-utils.h',
+  'gimpthumb.h',
+  'gimpthumbnail.h',
+]
+
+
+libgimpthumb = library('gimpthumb-'+ api_version,
+  libgimpthumb_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gdk_pixbuf, glib, gio, gobject,
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, ],
+)
+
+install_headers(
+  libgimpthumb_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpthumb'),
+)
+
+
+# test programs, not to be built by default and never installed
+gimp_thumbnail_list = executable('gimp-thumbnail-list',
+  'gimp-thumbnail-list.c',
+  include_directories: rootInclude,
+  dependencies: [
+    gdk_pixbuf, glib, gio, gobject,
+  ],
+  c_args: global_cflags,
+  link_with: libgimpthumb,
+  install: false,
+)
diff --git a/libgimpwidgets/meson.build b/libgimpwidgets/meson.build
index ce5e3be..5739695 100644
--- a/libgimpwidgets/meson.build
+++ b/libgimpwidgets/meson.build
@@ -1,3 +1,34 @@
+
+global_cflags = []
+global_lflags = []
+
+global_cflags += [
+]
+
+if platform_win32
+  global_cflags += '-no-undefined'
+  global_lflags += '-lgdi32'
+endif
+
+if platform_osx
+  global_cflags += '-xobjective-c'
+  global_lflags += ['-framework', 'Cocoa']
+endif
+
+if os_win32
+  # global_lflags += '-lole32'
+  # global_lflags += ['-export-symbols', 'gimpwidgets.def']
+endif
+
+
+global_cflags += [
+  '-DG_LOG_DOMAIN="'+ 'LibGimpWidgets' + '"',
+  '-DGIMP_WIDGETS_COMPILATION',
+]
+
+
+
+
 libgimpwidgets_sources = [
   'gimp3migration.c',
   'gimpbrowser.c',
@@ -41,8 +72,6 @@ libgimpwidgets_sources = [
   'gimpoldwidgets.c',
   'gimppageselector.c',
   'gimppatheditor.c',
-  'gimppickbutton-default.c',
-  'gimppickbutton-quartz.c',
   'gimppickbutton.c',
   'gimppixmap.c',
   'gimppreview.c',
@@ -60,9 +89,125 @@ libgimpwidgets_sources = [
   'gimpwidgets-error.c',
   'gimpwidgets-private.c',
   'gimpwidgets.c',
-  'gimpwidgetsenums.c',
   'gimpwidgetsutils.c',
   'gimpzoommodel.c',
-  'test-eevl.c',
-  'test-preview-area.c',
 ]
+
+if gtk_mac_integration_ok
+  libgimpwidgets_sources += 'gimppickbutton-quartz.c'
+  global_cflags += '-xobjective-c'
+else
+  libgimpwidgets_sources += 'gimppickbutton-default.c'
+endif
+
+# TODO mkenums
+libgimpwidgets_sources += [
+  'gimpwidgetsenums.c',
+  'gimpwidgetsmarshal.c',
+  'gimpwidgetsmarshal.h',
+]
+
+libgimpwidgets_headers = [
+  'gimp3migration.h',
+  'gimpbrowser.h',
+  'gimpbutton.h',
+  'gimpcairo-utils.h',
+  'gimpcellrenderercolor.h',
+  'gimpcellrenderertoggle.h',
+  'gimpchainbutton.h',
+  'gimpcolorarea.h',
+  'gimpcolorbutton.h',
+  'gimpcolordisplay.h',
+  'gimpcolordisplaystack.h',
+  'gimpcolorhexentry.h',
+  'gimpcolornotebook.h',
+  'gimpcolorprofilechooserdialog.h',
+  'gimpcolorprofilecombobox.h',
+  'gimpcolorprofilestore.h',
+  'gimpcolorprofileview.h',
+  'gimpcolorscale.h',
+  'gimpcolorscales.h',
+  'gimpcolorselect.h',
+  'gimpcolorselection.h',
+  'gimpcolorselector.h',
+  'gimpcontroller.h',
+  'gimpdialog.h',
+  'gimpenumcombobox.h',
+  'gimpenumlabel.h',
+  'gimpenumstore.h',
+  'gimpenumwidgets.h',
+  'gimpfileentry.h',
+  'gimpframe.h',
+  'gimphelpui.h',
+  'gimphintbox.h',
+  'gimpicons.h',
+  'gimpintcombobox.h',
+  'gimpintstore.h',
+  'gimpmemsizeentry.h',
+  'gimpnumberpairentry.h',
+  'gimpoffsetarea.h',
+  'gimpoldwidgets.h',
+  'gimppageselector.h',
+  'gimppatheditor.h',
+  'gimppickbutton.h',
+  'gimppixmap.h',
+  'gimppreview.h',
+  'gimppreviewarea.h',
+  'gimppropwidgets.h',
+  'gimpquerybox.h',
+  'gimpruler.h',
+  'gimpscaleentry.h',
+  'gimpscrolledpreview.h',
+  'gimpsizeentry.h',
+  'gimpstringcombobox.h',
+  'gimpunitcombobox.h',
+  'gimpunitmenu.h',
+  'gimpunitstore.h',
+  'gimpwidgets-error.h',
+  'gimpwidgets.h',
+  'gimpwidgetsenums.h',
+  'gimpwidgetstypes.h',
+  'gimpwidgetsutils.h',
+  'gimpzoommodel.h',
+]
+
+
+libgimpwidgets = library('gimpwidgets-'+ api_version,
+  libgimpwidgets_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gegl, gtk2, lcms, math
+  ],
+  c_args: global_cflags,
+  link_with: [ global_lflags, libgimpbase, libgimpcolor, libgimpconfig, ],
+)
+
+install_headers(
+  libgimpwidgets_headers,
+  install_dir: join_paths('gimp-' + api_version, 'libgimpwidgets'),
+)
+
+
+# test programs, not installed
+
+# test_preview_area = executable('test-preview-area',
+#   'test-preview-area.c',
+#   include_directories: rootInclude,
+#   dependencies: [
+#     gtk2,
+#   ],
+#   c_args: global_cflags,
+#   link_with: libgimpbase,
+#   install: false,
+# )
+
+test_eevl = executable('test-eevl',
+  'test-eevl.c',
+  include_directories: rootInclude,
+  dependencies: [
+    glib, gtk2,
+  ],
+  c_args: global_cflags,
+  link_with: [ libgimpcolor, libgimpwidgets, ],
+  install: false,
+)
diff --git a/meson.build b/meson.build
index 7fb2ae8..d46257f 100644
--- a/meson.build
+++ b/meson.build
@@ -99,6 +99,7 @@ endif
 
 ################################################################################
 # Dependencies
+math              = cc.find_library('m')
 
 atk               = dependency('atk',                version: '>=2.2.0')
 
@@ -118,10 +119,10 @@ freetype2         = dependency('freetype2',          version: '>=2.1.7')
 gdk_pixbuf_minver = '>=2.30.8'
 gdk_pixbuf        = dependency('gdk-pixbuf-2.0',     version: gdk_pixbuf_minver)
 
-gegl_minver       = '>=0.2.0'
-gegl              = dependency('gegl-0.2',           version: gegl_minver)
-# gegl_minver       = '>=0.3.21'
-# gegl              = dependency('gegl-0.3',           version: gegl_minver)
+# gegl_minver       = '>=0.2.0'
+# gegl              = dependency('gegl-0.2',           version: gegl_minver)
+gegl_minver       = '>=0.3.21'
+gegl              = dependency('gegl-0.3',           version: gegl_minver)
 
 gexiv2            = dependency('gexiv2',             version: '>=0.10.6')
 
@@ -130,6 +131,7 @@ gio_specific_name = 'gio-' + (os_win32 ? 'windows-2.0' : 'unix-2.0')
 gio_specific      = dependency(gio_specific_name)
 
 glib              = dependency('glib-2.0',           version: '>=2.43.0')
+gobject           = dependency('gobject-2.0',        version: '>=2.43.0')
 gmodule           = dependency('gmodule-no-export-2.0')
 
 gtk2_minver       = '>=2.24.10'
@@ -757,11 +759,11 @@ subdir('po-python')
 subdir('po-script-fu')
 subdir('po-tips')
 
-# Libraries
+# Libraries (order here is important!)
 subdir('libgimpbase')
 subdir('libgimpcolor')
-subdir('libgimpconfig')
 subdir('libgimpmath')
+subdir('libgimpconfig')
 subdir('libgimpmodule')
 subdir('libgimpthumb')
 subdir('libgimpwidgets')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]