project('simdjson', 'cpp',
  version: '0.5.0',
  meson_version: '>=0.49.2',
  default_options: ['buildtype=release', 'cpp_std=c++17', 'b_ndebug=if-release'],
  license: 'Apache',
)

public_incl = include_directories('include')

compiler_opts = []
if not get_option('simdjson_implementation_haswell')
  compiler_opts += ['-DSIMDJSON_IMPLEMENTATION_HASWELL=0']
endif
if not get_option('simdjson_implementation_westmere')
  compiler_opts += ['-DSIMDJSON_IMPLEMENTATION_WESTMERE=0']
endif
if not get_option('simdjson_implementation_arm64')
  compiler_opts += ['-DSIMDJSON_IMPLEMENTATION_ARM64=0']
endif
if not get_option('simdjson_implementation_fallback')
  compiler_opts += ['-DSIMDJSON_IMPLEMENTATION_FALLBACK=0']
endif
if not get_option('simdjson_exceptions')
  compiler_opts += ['-DSIMDJSON_EXCEPTIONS=0']
endif
thread_dep = dependency('threads', required: get_option('simdjson_enable_threads'))
if thread_dep.found()
  compiler_opts += ['-DSIMDJSON_THREADS_ENABLED=1']
endif

subdir('src')
