# Options for building

# Most options affect only the library.
# No options affect the plugins.

# When using meson build system:
# Set these options at configuration time using "meson configure -Dfoo"
#
# See the top meson.build, it puts some of these vars, upper-cased,
# into file resynth-config.h in the top of the build dir.
# But that file is not in the source.
# And then the source optionally compiles using e.g. "#ifdef SYNTH_THREADED"



# Option to install translations.
# Until fix to ScriptFu of GIMP 3.2, and fixes to the outer plugins,
# translations will not work even if installed.
option('install-translations', type : 'boolean', value : false)

# Option to install a plugin that tests the resynthesizer.
# Needed for CI by developers of the resynthesizer.
option('install-test', type : 'boolean', value : false)



# Option to build the simple API library
# It only heals.
# Not needed for Gimp.
# Is needed for testResynth test harness.
option('build-libheal', type : 'boolean', value : false)



# Option to log call tree and various statistics related to the algorithm
# Currently depends on GLib
option('synth-debug', type : 'boolean', value : false)



# Threading
#
# This is not as important as you might think.
# Threading speedup seems to be only about 2x.
#
# THREAD_LIMIT is hardcoded into engine.c at 12

# Engine library use threads?
option('synth-threaded', type : 'boolean', value : false)

# Engine use GLib threads versus posix threads
# This is moot unless option synth-threaded also chosen.
option('synth-use-glib-threads', type : 'boolean', value : true)



# Use GLib for platform independence
#
# The goal is a very portable engine,
# espcially for the simple API library,
# where you only want to heal.
#
# GLib provides platform independence,
# but some developers might not want to use it.
# Resynthesizer only uses it for basic things that are easily
# done some other way (see glibProxy.c)
#
# Note you can use GLib generally, but posix threads instead of GLib threads

# Engine library use GLib?
option('synth-use-glib', type : 'boolean', value : true)



# Animation of the process

# For debugging, animate the processing by periodically display in Gimp.
# You may see a brushfire front of pixels being synthesized, on first pass.
# You may see pixels "sparkle" with new color, on second passes.

# Animation seems to fail when build with option synth-threaded.

# Animation in slow motion requires build with option synth-deep-progress.
# Otherwise the animation is per pass.
# The first pass may take only seconds, and the subsequent passes are quicker
# and may flash past your view quickly.

option('synth-animate', type : 'boolean', value : false)


# Deep progress

# Progress may be shallow (every pass, say 1/6) or deep ( percent processed, say 1/100)

# The default is shallow: resynthesizer is so quick that
# that displaying progress is not useful?
# But shallow progress is not very useful since the first pass takes most of the time.

option('synth-deep-progress', type : 'boolean', value : false)