#import "Basic";
#import "Compiler";
#import "BuildCpp";
#import "Bindings_Generator";

#if OS == .WINDOWS {
    INCLUDE_DIR :: "C:/VulkanSDK/1.4.304.0/Include";
    LIB_DIR     :: "C:/VulkanSDK/1.4.304.0/Lib";
    LIB_NAME    :: "vulkan-1.lib";
} else #if OS == .LINUX {
    INCLUDE_DIR :: "";
    LIB_DIR     :: "";
} else #if OS == .MACOS {
    INCLUDE_DIR :: "/Users/vfs/VulkanSDK/1.4.313.1/macOS/include";
    LIB_DIR     :: "/Users/vfs/VulkanSDK/1.4.313.1/macOS/lib";
    LIB_NAME    :: "libvulkan";
}

#run {

    set_build_options_dc(.{do_output = false});

    lib_dir : string;

    #if OS == .WINDOWS {
        lib_dir = "windows";
    } else #if OS == .MACOS {
        lib_dir = "macos";
    } else #if OS == .LINUX {
        lib_dir = "linux";
    }

    opts : Generate_Bindings_Options;
    array_add(*opts.include_paths, INCLUDE_DIR);
    array_add(*opts.source_files, "vulkan/vulkan.h");

    array_add(*opts.system_library_paths, LIB_DIR);
    array_add(*opts.system_library_names, LIB_NAME);

    #if OS == .WINDOWS {
        opts.generate_library_declarations = false;

        opts.footer = FOOTER_WINDOWS;
    }

    generate_bindings(opts, tprint("%.jai", lib_dir));
}

FOOTER_WINDOWS :: #string DONE
vulkan_1 :: #library,system,no_dll "C:/VulkanSDK/1.4.304.0/Lib/vulkan-1";
DONE
