if(TARGET WrapLibClang::WrapLibClang)
    set(WrapLibClang_FOUND TRUE)
    return()
endif()

set(WrapLibClang_FOUND TRUE)
add_library(WrapLibClang::WrapLibClang IMPORTED INTERFACE)

target_include_directories(WrapLibClang::WrapLibClang INTERFACE ${CLANG_INCLUDE_DIRS})
if (NOT TARGET Threads::Threads)
    find_package(Threads)
endif()
qt_internal_disable_find_package_global_promotion(Threads::Threads)

target_link_libraries(WrapLibClang::WrapLibClang
    INTERFACE clang
    clang-cpp
    LLVM
    clangHandleCXX
    Threads::Threads
    )

set(QT_LIB_CLANG_VERSION_MAJOR @CLANG_VERSION_MAJOR@ CACHE STRING "" FORCE)
set(QT_LIB_CLANG_VERSION_MINOR @CLANG_VERSION_MINOR@ CACHE STRING "" FORCE)
set(QT_LIB_CLANG_VERSION_PATCH @CLANG_VERSION_PATCH@ CACHE STRING "" FORCE)
set(QT_LIB_CLANG_VERSION @CLANG_VERSION@ CACHE STRING "" FORCE)
set(QT_LIB_CLANG_LIBDIR "@CLANG_LIBDIR@" CACHE STRING "" FORCE)
set(QT_LIBCLANG_RESOURCE_DIR "\"@CLANG_INCLUDE_DIR@\"" CACHE STRING "" FORCE)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WrapLibClang
    REQUIRED_VARS WrapLibClang_FOUND
    VERSION_VAR LLVM_PACKAGE_VERSION)
