include(CMakeFindDependencyMacro)

find_package(${QT_VERSIONED_PREFIX} COMPONENTS Core Qml REQUIRED CONFIG)

set(CMAKE_POSITION_INDEPENDENT_CODE ${${QT_VERSIONED_PREFIX}_POSITION_INDEPENDENT_CODE})

if(NOT TARGET @QT_PROTOBUF_NAMESPACE@::@target@)
    include("${CMAKE_CURRENT_LIST_DIR}/@target_export@.cmake")
endif()

if(QT_PROTOBUF_STATIC AND NOT TARGET @QT_PROTOBUF_NAMESPACE@::@PROTOBUF_QUICK_PLUGIN_NAME@)
    include("${CMAKE_CURRENT_LIST_DIR}/@PROTOBUF_QUICK_PLUGIN_NAME@Targets.cmake")
endif()

@PACKAGE_INIT@
if(QT_PROTOBUF_STATIC)
    add_definitions(-DQT_PROTOBUF_STATIC)# add_definitions is used because old cmake versions
                                         # compatibility
endif()
