# Autogenerated wrapper script for OpenCVQt_jll for armv7l-linux-gnueabihf-cxx03
export libopencv_calib3d, libopencv_core, libopencv_dnn, libopencv_features2d, libopencv_flann, libopencv_gapi, libopencv_highgui, libopencv_imgcodecs, libopencv_imgproc, libopencv_ml, libopencv_objdetect, libopencv_photo, libopencv_stitching, libopencv_video, libopencv_videoio

using Qt_jll
using Libglvnd_jll
## Global variables
PATH = ""
LIBPATH = ""
LIBPATH_env = "LD_LIBRARY_PATH"
LIBPATH_default = ""

# Relative path to `libopencv_calib3d`
const libopencv_calib3d_splitpath = ["lib", "libopencv_calib3d.so"]

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

# libopencv_calib3d-specific global declaration
# This will be filled out by __init__()
libopencv_calib3d_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_calib3d = "libopencv_calib3d.so.4.5"


# Relative path to `libopencv_core`
const libopencv_core_splitpath = ["lib", "libopencv_core.so"]

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

# libopencv_core-specific global declaration
# This will be filled out by __init__()
libopencv_core_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_core = "libopencv_core.so.4.5"


# Relative path to `libopencv_dnn`
const libopencv_dnn_splitpath = ["lib", "libopencv_dnn.so"]

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

# libopencv_dnn-specific global declaration
# This will be filled out by __init__()
libopencv_dnn_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_dnn = "libopencv_dnn.so.4.5"


# Relative path to `libopencv_features2d`
const libopencv_features2d_splitpath = ["lib", "libopencv_features2d.so"]

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

# libopencv_features2d-specific global declaration
# This will be filled out by __init__()
libopencv_features2d_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_features2d = "libopencv_features2d.so.4.5"


# Relative path to `libopencv_flann`
const libopencv_flann_splitpath = ["lib", "libopencv_flann.so"]

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

# libopencv_flann-specific global declaration
# This will be filled out by __init__()
libopencv_flann_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_flann = "libopencv_flann.so.4.5"


# Relative path to `libopencv_gapi`
const libopencv_gapi_splitpath = ["lib", "libopencv_gapi.so"]

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

# libopencv_gapi-specific global declaration
# This will be filled out by __init__()
libopencv_gapi_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_gapi = "libopencv_gapi.so.4.5"


# Relative path to `libopencv_highgui`
const libopencv_highgui_splitpath = ["lib", "libopencv_highgui.so"]

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

# libopencv_highgui-specific global declaration
# This will be filled out by __init__()
libopencv_highgui_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_highgui = "libopencv_highgui.so.4.5"


# Relative path to `libopencv_imgcodecs`
const libopencv_imgcodecs_splitpath = ["lib", "libopencv_imgcodecs.so"]

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

# libopencv_imgcodecs-specific global declaration
# This will be filled out by __init__()
libopencv_imgcodecs_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_imgcodecs = "libopencv_imgcodecs.so.4.5"


# Relative path to `libopencv_imgproc`
const libopencv_imgproc_splitpath = ["lib", "libopencv_imgproc.so"]

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

# libopencv_imgproc-specific global declaration
# This will be filled out by __init__()
libopencv_imgproc_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_imgproc = "libopencv_imgproc.so.4.5"


# Relative path to `libopencv_ml`
const libopencv_ml_splitpath = ["lib", "libopencv_ml.so"]

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

# libopencv_ml-specific global declaration
# This will be filled out by __init__()
libopencv_ml_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_ml = "libopencv_ml.so.4.5"


# Relative path to `libopencv_objdetect`
const libopencv_objdetect_splitpath = ["lib", "libopencv_objdetect.so"]

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

# libopencv_objdetect-specific global declaration
# This will be filled out by __init__()
libopencv_objdetect_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_objdetect = "libopencv_objdetect.so.4.5"


# Relative path to `libopencv_photo`
const libopencv_photo_splitpath = ["lib", "libopencv_photo.so"]

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

# libopencv_photo-specific global declaration
# This will be filled out by __init__()
libopencv_photo_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_photo = "libopencv_photo.so.4.5"


# Relative path to `libopencv_stitching`
const libopencv_stitching_splitpath = ["lib", "libopencv_stitching.so"]

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

# libopencv_stitching-specific global declaration
# This will be filled out by __init__()
libopencv_stitching_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_stitching = "libopencv_stitching.so.4.5"


# Relative path to `libopencv_video`
const libopencv_video_splitpath = ["lib", "libopencv_video.so"]

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

# libopencv_video-specific global declaration
# This will be filled out by __init__()
libopencv_video_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_video = "libopencv_video.so.4.5"


# Relative path to `libopencv_videoio`
const libopencv_videoio_splitpath = ["lib", "libopencv_videoio.so"]

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

# libopencv_videoio-specific global declaration
# This will be filled out by __init__()
libopencv_videoio_handle = C_NULL

# This must be `const` so that we can use it with `ccall()`
const libopencv_videoio = "libopencv_videoio.so.4.5"


# Inform that the wrapper is available for this platform
wrapper_available = true

"""
Open all libraries
"""
function __init__()
    # This either calls `@artifact_str()`, or returns a constant string if we're overridden.
    global artifact_dir = find_artifact_dir()

    global PATH_list, LIBPATH_list
    # Initialize PATH and LIBPATH environment variable listings
    # From the list of our dependencies, generate a tuple of all the PATH and LIBPATH lists,
    # then append them to our own.
    foreach(p -> append!(PATH_list, p), (Qt_jll.PATH_list, Libglvnd_jll.PATH_list,))
    foreach(p -> append!(LIBPATH_list, p), (Qt_jll.LIBPATH_list, Libglvnd_jll.LIBPATH_list,))

    global libopencv_calib3d_path = normpath(joinpath(artifact_dir, libopencv_calib3d_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_calib3d_handle = dlopen(libopencv_calib3d_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_calib3d_path))

    global libopencv_core_path = normpath(joinpath(artifact_dir, libopencv_core_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_core_handle = dlopen(libopencv_core_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_core_path))

    global libopencv_dnn_path = normpath(joinpath(artifact_dir, libopencv_dnn_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_dnn_handle = dlopen(libopencv_dnn_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_dnn_path))

    global libopencv_features2d_path = normpath(joinpath(artifact_dir, libopencv_features2d_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_features2d_handle = dlopen(libopencv_features2d_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_features2d_path))

    global libopencv_flann_path = normpath(joinpath(artifact_dir, libopencv_flann_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_flann_handle = dlopen(libopencv_flann_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_flann_path))

    global libopencv_gapi_path = normpath(joinpath(artifact_dir, libopencv_gapi_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_gapi_handle = dlopen(libopencv_gapi_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_gapi_path))

    global libopencv_highgui_path = normpath(joinpath(artifact_dir, libopencv_highgui_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_highgui_handle = dlopen(libopencv_highgui_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_highgui_path))

    global libopencv_imgcodecs_path = normpath(joinpath(artifact_dir, libopencv_imgcodecs_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_imgcodecs_handle = dlopen(libopencv_imgcodecs_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_imgcodecs_path))

    global libopencv_imgproc_path = normpath(joinpath(artifact_dir, libopencv_imgproc_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_imgproc_handle = dlopen(libopencv_imgproc_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_imgproc_path))

    global libopencv_ml_path = normpath(joinpath(artifact_dir, libopencv_ml_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_ml_handle = dlopen(libopencv_ml_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_ml_path))

    global libopencv_objdetect_path = normpath(joinpath(artifact_dir, libopencv_objdetect_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_objdetect_handle = dlopen(libopencv_objdetect_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_objdetect_path))

    global libopencv_photo_path = normpath(joinpath(artifact_dir, libopencv_photo_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_photo_handle = dlopen(libopencv_photo_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_photo_path))

    global libopencv_stitching_path = normpath(joinpath(artifact_dir, libopencv_stitching_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_stitching_handle = dlopen(libopencv_stitching_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_stitching_path))

    global libopencv_video_path = normpath(joinpath(artifact_dir, libopencv_video_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_video_handle = dlopen(libopencv_video_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_video_path))

    global libopencv_videoio_path = normpath(joinpath(artifact_dir, libopencv_videoio_splitpath...))

    # Manually `dlopen()` this right now so that future invocations
    # of `ccall` with its `SONAME` will find this path immediately.
    global libopencv_videoio_handle = dlopen(libopencv_videoio_path, RTLD_LAZY | RTLD_DEEPBIND)
    push!(LIBPATH_list, dirname(libopencv_videoio_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__()
