@PACKAGE_INIT@

set(KAUTH_STUB_FILES_DIR "@PACKAGE_KDE_INSTALL_DATADIR_KF@/kauth/")

set(KAUTH_BACKEND_NAME "@KAUTH_BACKEND_NAME@")
set(KAUTH_HELPER_BACKEND_NAME "@KAUTH_HELPER_BACKEND_NAME@")
set(KAUTH_POLICY_FILES_INSTALL_DIR "@KAUTH_POLICY_FILES_INSTALL_DIR@")
set(KAUTH_HELPER_INSTALL_DIR "@KAUTH_HELPER_INSTALL_DIR@")
set(KAUTH_HELPER_INSTALL_ABSOLUTE_DIR "@KAUTH_HELPER_INSTALL_ABSOLUTE_DIR@")

include(CMakeFindDependencyMacro)

find_dependency(KF5CoreAddons "@KF_DEP_VERSION@")

if(NOT @BUILD_SHARED_LIBS@)
    find_dependency(Qt@QT_MAJOR_VERSION@DBus "@REQUIRED_QT_VERSION@")

    if(NOT @KAUTH_BUILD_CODEGENERATOR_ONLY@)
        find_dependency(Qt@QT_MAJOR_VERSION@Widgets "@REQUIRED_QT_VERSION@")
    endif()

    if(NOT KAUTH_BACKEND_NAME AND @UNIX@ AND NOT @APPLE@)
        find_dependency(PolkitQt@QT_MAJOR_VERSION@-1 "@POLKITQT_MIN_VERSION@")
    endif()

    if(KAUTH_BACKEND_NAME AND NOT @KAUTH_BUILD_CODEGENERATOR_ONLY@ AND "${KAUTH_BACKEND_NAME}" STREQUAL "POLKITQT@QT_MAJOR_VERSION@-1")
        find_dependency(PolkitQt@QT_MAJOR_VERSION@-1 "@POLKITQT_MIN_VERSION@")
    endif()
endif()

include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthMacros.cmake")

if(NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE")
    if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
        find_file(KAUTH_TARGETSFILE KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
        include("${KAUTH_TARGETSFILE}")
    else()
        include("${CMAKE_CURRENT_LIST_DIR}/KF5AuthToolsTargets.cmake")
    endif()
endif()
