set(PARAKEET_VERSION      @WHISPER_VERSION@)
set(PARAKEET_BUILD_COMMIT @WHISPER_BUILD_COMMIT@)
set(PARAKEET_BUILD_NUMBER @WHISPER_BUILD_NUMBER@)
set(PARAKEET_SHARED_LIB   @BUILD_SHARED_LIBS@)

@PACKAGE_INIT@

set_and_check(PARAKEET_INCLUDE_DIR "@PACKAGE_PARAKEET_INCLUDE_INSTALL_DIR@")
set_and_check(PARAKEET_LIB_DIR     "@PACKAGE_PARAKEET_LIB_INSTALL_DIR@")
set(PARAKEET_BIN_DIR "@PACKAGE_PARAKEET_BIN_INSTALL_DIR@")

find_package(ggml REQUIRED HINTS ${PARAKEET_LIB_DIR}/cmake)

find_library(parakeet_LIBRARY parakeet
    REQUIRED
    HINTS ${PARAKEET_LIB_DIR}
    NO_CMAKE_FIND_ROOT_PATH
)

add_library(parakeet UNKNOWN IMPORTED)
set_target_properties(parakeet
    PROPERTIES
    INTERFACE_INCLUDE_DIRECTORIES "${PARAKEET_INCLUDE_DIR}"
        INTERFACE_LINK_LIBRARIES "ggml::ggml;ggml::ggml-base;"
        IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
        IMPORTED_LOCATION "${parakeet_LIBRARY}"
        INTERFACE_COMPILE_FEATURES cxx_std_11
        POSITION_INDEPENDENT_CODE ON)

check_required_components(parakeet)
