@PACKAGE_INIT@

cmake_minimum_required(VERSION 3.14)

include("${CMAKE_CURRENT_LIST_DIR}/MMDeployTargets.cmake")

set(MMDEPLOY_CODEBASES @MMDEPLOY_CODEBASES@)
set(MMDEPLOY_TASKS @MMDEPLOY_TASKS@)
set(MMDEPLOY_TARGET_DEVICES @MMDEPLOY_TARGET_DEVICES@)
set(MMDEPLOY_TARGET_BACKENDS @MMDEPLOY_TARGET_BACKENDS@)
set(MMDEPLOY_BUILD_TYPE @CMAKE_BUILD_TYPE@)
set(MMDEPLOY_BUILD_SHARED @MMDEPLOY_SHARED_LIBS@)
set(MMDEPLOY_BUILD_SDK_MONOLITHIC @MMDEPLOY_BUILD_SDK_MONOLITHIC@)
set(MMDEPLOY_VERSION_MAJOR @MMDEPLOY_VERSION_MAJOR@)
set(MMDEPLOY_VERSION_MINOR @MMDEPLOY_VERSION_MINOR@)
set(MMDEPLOY_VERSION_PATCH @MMDEPLOY_VERSION_PATCH@)

if (NOT MMDEPLOY_BUILD_SHARED AND NOT MMDEPLOY_BUILD_SDK_MONOLITHIC)
    if ("cuda" IN_LIST MMDEPLOY_TARGET_DEVICES)
        find_package(CUDA REQUIRED)
        if(MSVC)
            set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc.exe)
        else()
            set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc)
        endif()
        set(CMAKE_CUDA_RUNTIME_LIBRARY Shared)
        enable_language(CUDA)
        find_package(pplcv REQUIRED)
    endif ()
endif ()

set(MMDEPLOY_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules")
list(APPEND CMAKE_MODULE_PATH ${MMDEPLOY_MODULE_PATH})
@SPDLOG_DEPENDENCY@
@TENSORRT_DEPENDENCY@
@CUDNN_DEPENDENCY@
@ONNXRUNTIME_DEPENDENCY@
@ncnn_DEPENDENCY@
@InferenceEngine_DEPENDENCY@
@pplnn_DEPENDENCY@
list(REMOVE_ITEM CMAKE_MODULE_PATH ${MMDEPLOY_MODULE_PATH})

find_package(OpenCV REQUIRED)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/MMDeploy.cmake")
