[gimp/meson: 111/127] Windows support preparation. Disabling most of windows-specific (broken) flags. Move/fix some featur



commit da6a1ed9716dec55a50209d5d225a4806485dcf0
Author: Félix Piédallu <felix piedallu me>
Date:   Mon Jan 29 17:41:30 2018 +0100

    Windows support preparation. Disabling most of windows-specific (broken) flags. Move/fix some 
feature-switches. Fix some typos.

 app/meson.build                   |    8 +++---
 build/archlinux/PKGBUILD          |    1 +
 data/brushes/meson.build          |    8 +++---
 data/patterns/meson.build         |    8 +++---
 data/tool-presets/meson.build     |    8 +++---
 libgimp/meson.build               |    8 +++---
 libgimpbase/meson.build           |   13 ++++++++---
 libgimpcolor/meson.build          |    7 +++--
 libgimpconfig/meson.build         |    2 +-
 libgimpmath/meson.build           |    2 +-
 libgimpmodule/meson.build         |    4 +--
 libgimpthumb/meson.build          |    2 +-
 libgimpwidgets/meson.build        |    4 +-
 meson.build                       |   41 ++++++++++++++++++++++--------------
 meson_options.txt                 |    1 +
 modules/meson.build               |    2 +-
 plug-ins/common/meson.build       |   29 +++++++++++++++++---------
 plug-ins/file-exr/meson.build     |    4 +++
 plug-ins/file-webp/meson.build    |    4 +++
 plug-ins/help-browser/meson.build |    4 +++
 plug-ins/imagemap/meson.build     |   18 ++++++++--------
 plug-ins/meson.build              |   28 ++++++-------------------
 plug-ins/print/meson.build        |    6 ++++-
 plug-ins/pygimp/meson.build       |    4 +++
 plug-ins/screenshot/meson.build   |    4 +++
 plug-ins/script-fu/meson.build    |    4 +++
 plug-ins/twain/meson.build        |    4 +++
 27 files changed, 135 insertions(+), 93 deletions(-)
---
diff --git a/app/meson.build b/app/meson.build
index 9977b6e..7f72498 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -70,17 +70,17 @@ app_cflags = [
 ]
 
 if platform_win32
-  app_cflags += '-no-undefined'
-  app_lflags += '-lgdi32'
+  app_cflags += '-Wl,-no-undefined'
+  # app_lflags += '-lgdi32'
 endif
 
 if platform_osx
   app_cflags += '-xobjective-c'
-  app_lflags += ['-framework', 'Cocoa']
+  #app_lflags += ['-framework', 'Cocoa']
 endif
 
 if platform_win32
-  app_lflags += [ '-mwindows', '-mexchndl', ]
+  # app_lflags += [ '-mwindows', '-mexchndl', ]
   # app_lflags += ['-export-symbols', 'gimpwidgets.def']
 endif
 
diff --git a/build/archlinux/PKGBUILD b/build/archlinux/PKGBUILD
index a744105..40626f0 100644
--- a/build/archlinux/PKGBUILD
+++ b/build/archlinux/PKGBUILD
@@ -17,6 +17,7 @@ depends=(
   'desktop-file-utils'
   'gegl-git>=0.3.15'
   'gtk-doc'
+  'intltool'
   'lcms2>=2.2'
   'libart-lgpl>=2.3.19'
   'libexif>=0.6.15'
diff --git a/data/brushes/meson.build b/data/brushes/meson.build
index 1c1d466..549ce14 100644
--- a/data/brushes/meson.build
+++ b/data/brushes/meson.build
@@ -1,13 +1,13 @@
-brushes = run_command('find',
+brushes = run_command(find,
   meson.current_source_dir(),
   '-maxdepth', '1',
   '-mindepth', '1',
   '-type', 'd',
-  '-printf', '%f\n'
+  '-printf', '%f'+findsep
 ).stdout().strip().split('\n')
 
 foreach brush : brushes
-  files = run_command('find',
+  files = run_command(find,
     join_paths(meson.current_source_dir(), brush),
     '-type', 'f',
     '(',
@@ -17,7 +17,7 @@ foreach brush : brushes
     '-o',
     '-name', '*.vbr',
     ')',
-    '-printf', brush + '/%f\n'
+    '-printf', brush + '/%f'+findsep
   ).stdout().strip().split('\n')
 
 
diff --git a/data/patterns/meson.build b/data/patterns/meson.build
index 946c8a7..fb1acca 100644
--- a/data/patterns/meson.build
+++ b/data/patterns/meson.build
@@ -1,17 +1,17 @@
-patterns = run_command('find',
+patterns = run_command(find,
   meson.current_source_dir(),
   '-maxdepth', '1',
   '-mindepth', '1',
   '-type', 'd',
-  '-printf', '%f\n'
+  '-printf', '%f'+findsep
 ).stdout().strip().split('\n')
 
 foreach pattern : patterns
-  files = run_command('find',
+  files = run_command(find,
     join_paths(meson.current_source_dir(), pattern),
     '-type', 'f',
     '-name', '*.pat',
-    '-printf', pattern + '/%f\n'
+    '-printf', pattern + '/%f'+findsep
   ).stdout().strip().split('\n')
 
 
diff --git a/data/tool-presets/meson.build b/data/tool-presets/meson.build
index 1ee4451..6961600 100644
--- a/data/tool-presets/meson.build
+++ b/data/tool-presets/meson.build
@@ -1,17 +1,17 @@
-presets = run_command('find',
+presets = run_command(find,
   meson.current_source_dir(),
   '-maxdepth', '1',
   '-mindepth', '1',
   '-type', 'd',
-  '-printf', '%f\n'
+  '-printf', '%f'+findsep
 ).stdout().strip().split('\n')
 
 foreach preset : presets
-  files = run_command('find',
+  files = run_command(find,
     join_paths(meson.current_source_dir(), preset),
     '-type', 'f',
     '-name', '*.gtp',
-    '-printf', preset + '/%f\n'
+    '-printf', preset + '/%f'+findsep
   ).stdout().strip().split('\n')
 
 
diff --git a/libgimp/meson.build b/libgimp/meson.build
index 769a3c5..3cdcb9e 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -279,8 +279,8 @@ libgimp_top_lflags = [
 ]
 
 if platform_win32
-  libgimp_top_lflags += ['-export-symbols', 'gimp.def']
-  libgimp_top_lflags += '-lexchndl'
+  # libgimp_top_lflags += ['-export-symbols', 'gimp.def']
+  # libgimp_top_lflags += '-lexchndl'
 endif
 
 
@@ -308,8 +308,8 @@ libgimpui_lflags = [
 ]
 
 if platform_win32
-  libgimpui_lflags += ['-export-symbols', 'gimpui.def']
-  libgimpui_lflags += '-lexchndl'
+  # libgimpui_lflags += ['-export-symbols', 'gimpui.def']
+  # libgimpui_lflags += '-lexchndl'
 endif
 
 libgimpui = library('gimpui-'+ api_version,
diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build
index 15be88e..e4d9c3b 100644
--- a/libgimpbase/meson.build
+++ b/libgimpbase/meson.build
@@ -91,10 +91,13 @@ libgimpbase_cflags = [
   '-DG_LOG_DOMAIN="LibGimpBase"',
   '-DGIMP_BASE_COMPILATION',
 ]
+libgimpbase_deps = [
+  gexiv2, gio, math,
+]
 libgimpbase_lflags = [ ]
 
 if platform_win32
-  libgimpbase_lflags += '-lole32'
+  libgimpbase_deps += ole32
   libgimpbase_lflags += ['-export-symbols', 'gimpbase.def']
 endif
 
@@ -103,10 +106,11 @@ libgimpbase = library('gimpbase-' + api_version,
   libgimpbase_sources,
   include_directories: rootInclude,
   dependencies: [
-    gexiv2, gio, math,
+    libgimpbase_deps,
   ],
   c_args:     [ libgimp_cflags, libgimpbase_cflags, ],
-  link_with:  [ libgimp_lflags, libgimpbase_lflags, ],
+  link_with:  [ libgimp_lflags, ],
+  link_args:  [ libgimpbase_lflags, ],
   install: true,
   version: so_version,
 )
@@ -125,6 +129,7 @@ executable('test-cpu-accel',
     glib,
   ],
   c_args:     [ libgimp_cflags, libgimpbase_cflags, ],
-  link_with:  [ libgimp_lflags, libgimpbase_lflags, libgimpbase, ],
+  link_with:  [ libgimp_lflags, libgimpbase, ],
+  link_args:  [ libgimpbase_lflags, ],
   install: false,
 )
diff --git a/libgimpcolor/meson.build b/libgimpcolor/meson.build
index fd6d3b2..811e9ba 100644
--- a/libgimpcolor/meson.build
+++ b/libgimpcolor/meson.build
@@ -35,13 +35,14 @@ libgimpcolor_cflags = [
   '-DG_LOG_DOMAIN="LibGimpColor"',
   '-DGIMP_COLOR_COMPILATION',
 ]
+libgimpcolor_deps = [ ]
 libgimpcolor_lflags = [
   libgimpbase,
 ]
 
 if platform_win32
-  libgimpcolor_lflags += '-lole32'
-  libgimpcolor_lflags += ['-export-symbols', 'gimpcolor.def']
+  libgimpcolor_deps += ole32
+  # libgimpcolor_lflags += ['-export-symbols', 'gimpcolor.def']
 endif
 
 
@@ -49,7 +50,7 @@ libgimpcolor = library('gimpcolor-' + api_version,
   libgimpcolor_sources,
   include_directories: rootInclude,
   dependencies: [
-    cairo, gdk_pixbuf, gegl, lcms, math,
+    cairo, gdk_pixbuf, gegl, lcms, math, libgimpcolor_deps,
   ],
   c_args:     [ libgimp_cflags, libgimpcolor_cflags, ],
   link_with:  [ libgimp_lflags, libgimpcolor_lflags, ],
diff --git a/libgimpconfig/meson.build b/libgimpconfig/meson.build
index 618d7cb..a4df886 100644
--- a/libgimpconfig/meson.build
+++ b/libgimpconfig/meson.build
@@ -57,7 +57,7 @@ libgimpconfig_lflags = [
 ]
 
 if platform_win32
-  libgimpconfig_lflags += ['-export-symbols', 'gimpconfig.def']
+  # libgimpconfig_lflags += ['-export-symbols', 'gimpconfig.def']
 endif
 
 
diff --git a/libgimpmath/meson.build b/libgimpmath/meson.build
index 042278d..e345a9e 100644
--- a/libgimpmath/meson.build
+++ b/libgimpmath/meson.build
@@ -24,7 +24,7 @@ libgimpmath_lflags = [
 ]
 
 if platform_win32
-  libgimpmath_lflags += ['-export-symbols', 'gimpmath.def']
+  # libgimpmath_lflags += ['-export-symbols', 'gimpmath.def']
 endif
 
 
diff --git a/libgimpmodule/meson.build b/libgimpmodule/meson.build
index 6c9f8e2..3ea2978 100644
--- a/libgimpmodule/meson.build
+++ b/libgimpmodule/meson.build
@@ -21,7 +21,7 @@ libgimpmodule_lflags = [
 ]
 
 if platform_win32
-  libgimpmodule_lflags += ['-export-symbols', 'gimpmodule.def']
+  # libgimpmodule_lflags += ['-export-symbols', 'gimpmodule.def']
 endif
 
 
@@ -41,5 +41,3 @@ install_headers(
   libgimpmodule_headers,
   subdir: join_paths(gimp_api_name, 'libgimpmodule'),
 )
-
-
diff --git a/libgimpthumb/meson.build b/libgimpthumb/meson.build
index d7fb7c5..ddca249 100644
--- a/libgimpthumb/meson.build
+++ b/libgimpthumb/meson.build
@@ -56,7 +56,7 @@ libgimpthumb_lflags = [
 ]
 
 if platform_win32
-  libgimpthumb_lflags += ['-export-symbols', 'gimpthumb.def']
+  # libgimpthumb_lflags += ['-export-symbols', 'gimpthumb.def']
 endif
 
 
diff --git a/libgimpwidgets/meson.build b/libgimpwidgets/meson.build
index 05f61a4..329a02d 100644
--- a/libgimpwidgets/meson.build
+++ b/libgimpwidgets/meson.build
@@ -165,8 +165,8 @@ libgimpwidgets_lflags = [
 ]
 
 if platform_win32
-  libgimpwidgets_lflags += ['-export-symbols', 'gimpwidgets.def']
-  libgimpwidgets_lflags += '-lgdi32'
+  # libgimpwidgets_lflags += ['-export-symbols', 'gimpwidgets.def']
+  # libgimpwidgets_lflags += '-lgdi32'
 endif
 
 if gtk_mac_integration_ok
diff --git a/meson.build b/meson.build
index 8674d9a..1b26699 100644
--- a/meson.build
+++ b/meson.build
@@ -106,6 +106,10 @@ if platform_win32
   windows = import('windows')
 endif
 
+# Find utils
+find = find_program('find')
+findsep = platform_win32 ? '\r\n' : '\n'
+
 ################################################################################
 # Dependencies
 math              = cc.find_library('m')
@@ -277,14 +281,25 @@ if gtk2.get_pkgconfig_variable('target') == 'x11'
       error('x11 install does not provide required function ' + function)
     endif
   endforeach
+  have_xlibs = true
 else
   x11    = dependency('', required: false)
   xmu    = dependency('', required: false)
   xt     = dependency('', required: false)
   xext   = dependency('', required: false)
   xfixes = dependency('', required: false)
+  have_xlibs = false
 endif
 
+# Print support
+have_print      = get_option('with-print')
+have_screenshot = get_option('with-screenshot')
+if have_print and not have_xlibs
+  error('Printing requires x libs')
+endif
+if have_screenshot and not have_xlibs
+  error('Screenshot requires x libs')
+endif
 
 ################################################################################
 # MIME types
@@ -448,7 +463,7 @@ if get_option('with-xmc')
   xmc = dependency('xcursor')
   MIMEtypes += [ 'image/x-xcursor', ]
 else
-  dependency('', required: false)
+  xmc = dependency('', required: false)
 endif
 
 
@@ -495,7 +510,7 @@ endif
 if get_option('with-gudev')
   gudev = dependency('gudev-1.0', version: '>=167')
 else
-  guvev = dependency('', required: false)
+  gudev = dependency('', required: false)
 endif
 
 
@@ -526,10 +541,6 @@ endif
 have_scriptfu = get_option('with-script-fu')
 
 
-# Print support
-have_print = get_option('with-print')
-
-
 # Check for GTK Mac Integration
 gtk_mac_integration_ok = false
 if platform_osx and (gtk2.get_pkgconfig_variable('target') == 'xquartz')
@@ -563,21 +574,21 @@ have_vector_icons = true
 if get_option('with-xvfb-run')
   xvfb_run = find_program('xvfb-run')
 else
-  xvfb_run = find_program('', required: false)
+  xvfb_run = dependency('', required: false)
 endif
 
 
 if get_option('with-appdata-test')
   appstream_util = find_program('appstream-util')
 else
-  appstream_util = find_program('', required: false)
+  appstream_util = dependency('', required: false)
 endif
 
 
 if get_option('with-gtk-doc')
   gtkdoc_scan = find_program('gtkdoc-scan', required : true)
 else
-  gtkdoc_scan = find_program('', required: false)
+  gtkdoc_scan = dependency('', required: false)
 endif
 
 enable_default_bin = get_option('enable-default-bin')
@@ -696,12 +707,10 @@ conf.set_quoted('GETTEXT_PACKAGE',gettext_package)
 ################################################################################
 # ISO codes
 
-isocodes = dependency('iso-codes', required: false)
-if isocodes.found()
-  isocodes_prefix = isocodes.get_pkgconfig_variable('prefix')
-  isocodes_location = join_paths(isocodes_prefix,get_option('datadir'),'xml','iso-codes')
-  isocodes_localedir= join_paths(isocodes_prefix,get_option('datadir'),'locale')
-endif
+isocodes = dependency('iso-codes')
+isocodes_prefix = isocodes.get_pkgconfig_variable('prefix')
+isocodes_location = join_paths(isocodes_prefix,get_option('datadir'),'xml','iso-codes')
+isocodes_localedir= join_paths(isocodes_prefix,get_option('datadir'),'locale')
 
 
 ################################################################################
@@ -775,7 +784,7 @@ libgimp_cflags = [
 libgimp_lflags = []
 
 if platform_win32
-  libgimp_cflags += '-no-undefined'
+  libgimp_cflags += '-Wl,-no-undefined'
 endif
 
 if platform_osx
diff --git a/meson_options.txt b/meson_options.txt
index 76f50b9..fea8e6f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,6 +19,7 @@ option('with-mng',          type: 'boolean', value: true)
 option('with-openexr',      type: 'boolean', value: true)
 option('with-poppler',      type: 'boolean', value: true)
 option('with-print',        type: 'boolean', value: true)
+option('with-screenshot',   type: 'boolean', value: true)
 option('with-python',       type: 'boolean', value: true)
 option('with-script-fu',    type: 'boolean', value: true)
 option('with-vec-icons',    type: 'boolean', value: true)
diff --git a/modules/meson.build b/modules/meson.build
index 6f3f5f0..c50b75d 100644
--- a/modules/meson.build
+++ b/modules/meson.build
@@ -6,7 +6,7 @@ global_cflags += [
 ]
 
 if platform_win32
-  global_cflags += '-no-undefined'
+  global_cflags += '-Wl,-no-undefined'
 endif
 
 if platform_osx
diff --git a/plug-ins/common/meson.build b/plug-ins/common/meson.build
index 232f53c..91e5901 100644
--- a/plug-ins/common/meson.build
+++ b/plug-ins/common/meson.build
@@ -267,21 +267,11 @@ common_exes_list = [
     [ gtk2, gegl, gdk_pixbuf, ],
   ],
   [
-    'file-wmf',
-    [ 'file-wmf.c', ],
-    [ gtk2, gegl, wmf, ],
-  ],
-  [
     'file-xbm',
     [ 'file-xbm.c', ],
     [ gtk2, gegl, gdk_pixbuf, ],
   ],
   [
-    'file-xmc',
-    [ 'file-xmc.c', ],
-    [ gtk2, gegl, xmc, ],
-  ],
-  [
     'file-xpm',
     [ 'file-xpm.c', ],
     [ gtk2, gegl, libxpm, ],
@@ -458,6 +448,25 @@ common_exes_list = [
   ],
 ]
 
+if wmf.found()
+  common_exes_list += [
+    [
+      'file-wmf',
+      [ 'file-wmf.c', ],
+      [ gtk2, gegl, wmf, ],
+    ],
+  ]
+endif
+if xmc.found()
+  common_exes_list += [
+    [
+      'file-xmc',
+      [ 'file-xmc.c', ],
+      [ gtk2, gegl, xmc, ],
+    ],
+  ]
+endif
+
 if webkit.found()
   common_exes_list += [
     [
diff --git a/plug-ins/file-exr/meson.build b/plug-ins/file-exr/meson.build
index 024bc62..26ede2c 100644
--- a/plug-ins/file-exr/meson.build
+++ b/plug-ins/file-exr/meson.build
@@ -1,3 +1,5 @@
+if openexr.found()
+
 # TODO file-exr.rc.o
 
 file_exr = executable('file-exr',
@@ -21,3 +23,5 @@ file_exr = executable('file-exr',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/file-webp/meson.build b/plug-ins/file-webp/meson.build
index a9d7a0c..2ed6482 100644
--- a/plug-ins/file-webp/meson.build
+++ b/plug-ins/file-webp/meson.build
@@ -1,3 +1,5 @@
+if webp.found()
+
 # TODO file-webp.rc.o
 
 file_webp = executable('file-webp',
@@ -23,3 +25,5 @@ file_webp = executable('file-webp',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/help-browser/meson.build b/plug-ins/help-browser/meson.build
index 6a5aa89..1d4d530 100644
--- a/plug-ins/help-browser/meson.build
+++ b/plug-ins/help-browser/meson.build
@@ -1,3 +1,5 @@
+if webkit.found()
+
 # TODO help-browser.rc.o
 
 help_browser = executable('help-browser',
@@ -24,3 +26,5 @@ help_browser = executable('help-browser',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/imagemap/meson.build b/plug-ins/imagemap/meson.build
index 2fdb3dd..e3fcfcb 100644
--- a/plug-ins/imagemap/meson.build
+++ b/plug-ins/imagemap/meson.build
@@ -86,12 +86,12 @@ imagemap = executable('imagemap',
 )
 
 # TODO flex / bison re-generators
-custom_target('rebuild-parsers',
-  input : [],
-  output: [ 'rebuild-parsers', ],
-  command: [
-
-  ],
-  build_by_default: false,
-  build_always: true,
-)
+# custom_target('rebuild-parsers',
+#  input : [],
+#  output: [ 'rebuild-parsers', ],
+#  command: [
+#
+#  ],
+#  build_by_default: false,
+#  build_always: true,
+#)
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
index 2bdc904..82896f8 100644
--- a/plug-ins/meson.build
+++ b/plug-ins/meson.build
@@ -1,8 +1,6 @@
 subdir('common')
 subdir('file-bmp')
-if openexr.found()
-  subdir('file-exr')
-endif
+subdir('file-exr')
 subdir('file-faxg3')
 subdir('file-fits')
 subdir('file-fli')
@@ -12,36 +10,24 @@ subdir('file-psd')
 subdir('file-raw')
 subdir('file-sgi')
 subdir('file-tiff')
-if webp.found()
-  subdir('file-webp')
-endif
+subdir('file-webp')
 subdir('flame')
 subdir('fractal-explorer')
 subdir('gfig')
 subdir('gimpressionist')
 subdir('gradient-flare')
+subdir('help-browser')
 subdir('help')
-if webkit.found()
-  subdir('help-browser')
-endif
 subdir('ifs-compose')
 subdir('imagemap')
 subdir('lighting')
 subdir('map-object')
 subdir('metadata')
 subdir('pagecurl')
-if have_print
-  subdir('print')
-endif
-if have_python
-  subdir('pygimp')
-endif
+subdir('print')
+subdir('pygimp')
 subdir('screenshot')
-if have_scriptfu
-  subdir('script-fu')
-endif
+subdir('script-fu')
 subdir('selection-to-path')
-if platform_win32
-  subdir('twain')
-endif
+subdir('twain')
 subdir('ui')
diff --git a/plug-ins/print/meson.build b/plug-ins/print/meson.build
index 9d5d664..a6fe867 100644
--- a/plug-ins/print/meson.build
+++ b/plug-ins/print/meson.build
@@ -1,3 +1,5 @@
+if have_print
+
 plugin_print_sources = [
   'print-draw-page.c',
   'print-page-layout.c',
@@ -13,7 +15,7 @@ print = executable('print',
   include_directories: [ rootInclude, ],
   dependencies: [
     gtk2, gegl,
-    x11, xmu, xext, xfixes,
+    # x11, xmu, xext, xfixes,
   ],
   link_with: [
     libgimp,
@@ -27,3 +29,5 @@ print = executable('print',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/pygimp/meson.build b/plug-ins/pygimp/meson.build
index e393ddf..7c836c6 100644
--- a/plug-ins/pygimp/meson.build
+++ b/plug-ins/pygimp/meson.build
@@ -1,3 +1,5 @@
+if have_python
+
 subdir('doc')
 subdir('plug-ins')
 
@@ -123,3 +125,5 @@ custom_target('pygimp.interp',
   install: true,
   install_dir: join_paths(gimpplugindir, 'interpreters'),
 )
+
+endif
diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build
index 2d510ce..a6043a0 100644
--- a/plug-ins/screenshot/meson.build
+++ b/plug-ins/screenshot/meson.build
@@ -1,3 +1,5 @@
+if have_screenshot
+
 plugin_screenshot_sources = [
   'screenshot-freedesktop.c',
   'screenshot-gnome-shell.c',
@@ -28,3 +30,5 @@ screenshot = executable('screenshot',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/script-fu/meson.build b/plug-ins/script-fu/meson.build
index a1e04be..9da857c 100644
--- a/plug-ins/script-fu/meson.build
+++ b/plug-ins/script-fu/meson.build
@@ -1,3 +1,5 @@
+if have_scriptfu
+
 scriptfu_incdir = include_directories('.')
 
 subdir('tinyscheme')
@@ -45,3 +47,5 @@ scriptfu = executable('script-fu',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif
diff --git a/plug-ins/twain/meson.build b/plug-ins/twain/meson.build
index a1ab40e..15dd863 100644
--- a/plug-ins/twain/meson.build
+++ b/plug-ins/twain/meson.build
@@ -1,3 +1,5 @@
+if platform_win32
+
 # Win32 specific
 plugin_twain_sources = [
   'tw_func.c',
@@ -47,3 +49,5 @@ twain = executable('twain',
   install: true,
   install_dir: join_paths(gimpplugindir, 'plug-ins'),
 )
+
+endif


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