# Autogenerated wrapper script for nv_codec_headers_jll for any
export dynlink_cuda_h, dynlink_cuviddec_h, dynlink_loader_h, dynlink_nvcuvid_h, nvEncodeAPI_h

## Global variables
PATH = ""
LIBPATH = ""
LIBPATH_env = "LD_LIBRARY_PATH"
LIBPATH_default = ""

# Relative path to `dynlink_cuda_h`
const dynlink_cuda_h_splitpath = ["include", "ffnvcodec", "dynlink_cuda.h"]

# This will be filled out by __init__() for all products, as it must be done at runtime
dynlink_cuda_h_path = ""

# dynlink_cuda_h-specific global declaration
# This will be filled out by __init__()
dynlink_cuda_h = ""


# Relative path to `dynlink_cuviddec_h`
const dynlink_cuviddec_h_splitpath = ["include", "ffnvcodec", "dynlink_cuviddec.h"]

# This will be filled out by __init__() for all products, as it must be done at runtime
dynlink_cuviddec_h_path = ""

# dynlink_cuviddec_h-specific global declaration
# This will be filled out by __init__()
dynlink_cuviddec_h = ""


# Relative path to `dynlink_loader_h`
const dynlink_loader_h_splitpath = ["include", "ffnvcodec", "dynlink_loader.h"]

# This will be filled out by __init__() for all products, as it must be done at runtime
dynlink_loader_h_path = ""

# dynlink_loader_h-specific global declaration
# This will be filled out by __init__()
dynlink_loader_h = ""


# Relative path to `dynlink_nvcuvid_h`
const dynlink_nvcuvid_h_splitpath = ["include", "ffnvcodec", "dynlink_nvcuvid.h"]

# This will be filled out by __init__() for all products, as it must be done at runtime
dynlink_nvcuvid_h_path = ""

# dynlink_nvcuvid_h-specific global declaration
# This will be filled out by __init__()
dynlink_nvcuvid_h = ""


# Relative path to `nvEncodeAPI_h`
const nvEncodeAPI_h_splitpath = ["include", "ffnvcodec", "nvEncodeAPI.h"]

# This will be filled out by __init__() for all products, as it must be done at runtime
nvEncodeAPI_h_path = ""

# nvEncodeAPI_h-specific global declaration
# This will be filled out by __init__()
nvEncodeAPI_h = ""


"""
Open all libraries
"""
function __init__()
    global artifact_dir = abspath(artifact"nv_codec_headers")

    # Initialize PATH and LIBPATH environment variable listings
    global PATH_list, LIBPATH_list
    global dynlink_cuda_h_path = normpath(joinpath(artifact_dir, dynlink_cuda_h_splitpath...))

    global dynlink_cuda_h = dynlink_cuda_h_path
    global dynlink_cuviddec_h_path = normpath(joinpath(artifact_dir, dynlink_cuviddec_h_splitpath...))

    global dynlink_cuviddec_h = dynlink_cuviddec_h_path
    global dynlink_loader_h_path = normpath(joinpath(artifact_dir, dynlink_loader_h_splitpath...))

    global dynlink_loader_h = dynlink_loader_h_path
    global dynlink_nvcuvid_h_path = normpath(joinpath(artifact_dir, dynlink_nvcuvid_h_splitpath...))

    global dynlink_nvcuvid_h = dynlink_nvcuvid_h_path
    global nvEncodeAPI_h_path = normpath(joinpath(artifact_dir, nvEncodeAPI_h_splitpath...))

    global nvEncodeAPI_h = nvEncodeAPI_h_path
    # Filter out duplicate and empty entries in our PATH and LIBPATH entries
    filter!(!isempty, unique!(PATH_list))
    filter!(!isempty, unique!(LIBPATH_list))
    global PATH = join(PATH_list, ':')
    global LIBPATH = join(vcat(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)]), ':')

    
end  # __init__()

