libs =

# Links full libmoltenvk for the shared conversion implementation (upstream
# links MoltenVK::MoltenVK). spirv-cross-msl provides public headers used by
# the tool sources. Import liba{} explicitly: SPIRV-Cross's C++ components
# are static-only (upstream's C++ API isn't ABI-stable, only its separate
# C API is).
#
import libs += libmoltenvk%lib{MoltenVK} \
               libspirv-cross%liba{spirv-cross-msl}

exe{MoltenVKShaderConverter}: {h cxx mm}{*} $libs

# Flat -I for upstream headers symlinked into src/.
#
cc.poptions =+ "-I$src_base"

# After config.cxx.coptions so -Wextra does not re-enable them.
# unguarded-availability-new: MVK_XCODE_26 vs older deployment target.
# unused-parameter, unused-variable: macOS-unused OS min-version args,
# unused _default*ShaderExtns statics.
#
if ($cxx.id.type == 'clang')
  cxx.coptions += -Wno-unguarded-availability-new \
                  -Wno-unused-parameter -Wno-unused-variable

# Help text uses '\e' (ASCII ESC) for bold, a GNU/clang extension that
# -Wpedantic rejects. Scoped to this TU so the rest of the tool stays
# under the user's pedantic flags.
#
if ($cxx.id.type == 'clang')
  obj{MoltenVKShaderConverterTool}: cxx.coptions += -Wno-pedantic
