intf_libs = # Interface dependencies.

if($config.libtaskflow.cuda)
  import intf_libs += \
    cuda-cudart%libs{cudart}

lib{taskflow}: {hxx ixx txx}{**} $intf_libs

# Build options.
#
cxx.poptions =+ "-I$out_root" "-I$src_root"

# Export options.
#
lib{taskflow}:
{
  cxx.export.poptions = "-I$out_root" "-I$src_root" \
    ($config.libtaskflow.task_pool                  ? -DTF_ENABLE_TASK_POOL :) \
    ($config.libtaskflow.atomic_notifier            ? -DTF_ENABLE_ATOMIC_NOTIFIER :) \
    ($config.libtaskflow.disable_exception_handling ? -DTF_DISABLE_EXCEPTION_HANDLING :)
  cxx.export.libs = $intf_libs

  libtaskflow.cuda = [bool] $config.libtaskflow.cuda
}

if ($cxx.target.system != 'win32-msvc')
{
  cxx.libs += -pthread
  lib{taskflow}: cxx.export.libs += -pthread
}

# Install into the taskflow/ subdirectory of, say, /usr/include/
# recreating subdirectories.
#
{hxx ixx txx}{*}:
{
  install         = include/taskflow/
  install.subdirs = true
}
