# infer/weight-stream/arch-compat — PLAN12 14.04: per-arch layer-layout descriptor +
# compatibility gate. mlxm_sources() globs this dir's .cpp into mlx-magic-lib. The
# packs/ TOMLs are DATA discovered at runtime; MLXM_ARCH_PACKS pins their absolute
# source path so the dev build + ctest find real packs with no install step (an env
# MLXM_ARCH_PACKS_DIR overrides it, and install.command copies packs beside the binary).
mlxm_sources()
if(MLXM_RESOURCE_ROOT)
    target_compile_definitions(mlx-magic-lib PRIVATE
        MLXM_ARCH_PACKS="${MLXM_RESOURCE_ROOT}/arch-packs")
else()
    target_compile_definitions(mlx-magic-lib PRIVATE
        MLXM_ARCH_PACKS="${CMAKE_CURRENT_SOURCE_DIR}/packs")
endif()
