INCLUDE_DIR :: "src/SDL-release-3.2.16/include";

#if OS == .WINDOWS {
    LIB_DIR :: "src/SDL-release-3.2.16/build-windows/Debug";
    bindings_name := "windows.jai";
    LIB_NAME :: "SDL3";
} else #if OS == .MACOS {
    LIB_DIR :: "src/SDL-release-3.2.16/build-macos-debug";
    bindings_name := "macos.jai";
    LIB_NAME :: "libSDL3";
} else {
    #assert "OS not supported";
}

#run {
    #import "Basic";
    #import "Bindings_Generator";
    #import "Compiler";

    set_build_options_dc(.{do_output = false});
    if !generate_bindings() {
        compiler_set_workspace_status(.FAILED);
    }
}

generate_bindings :: () -> bool {
    using opts : Generate_Bindings_Options;

    c_enum_emulation = true;
    generate_library_declarations = true;
    strip_enum_prefixes = false;
    auto_detect_enum_prefixes = false;
    alias_original_enum_names = false;

    array_add(*libpaths, LIB_DIR);
    array_add(*libnames, LIB_NAME);


    array_add(*include_paths, INCLUDE_DIR);
    array_add(*source_files, "SDL3/SDL.h");
    array_add(*source_files, "SDL3/SDL_vulkan.h");

    return generate_bindings(opts, bindings_name);
}
