# TelepathyQt@QT_VERSION_MAJOR@ServiceConfig.cmake is generated by CMake from TelepathyQt/TelepathyQtServiceConfig.cmake.in.
# Any changed value in this file will be overwritten by CMake.

@PACKAGE_INIT@

# set the version number
set(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_VERSION_MAJOR @TP_QT_MAJOR_VERSION@)
set(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_VERSION_MINOR @TP_QT_MINOR_VERSION@)
set(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_VERSION_MICRO @TP_QT_MICRO_VERSION@)
set(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_VERSION_NANO @TP_QT_NANO_VERSION@)
set(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_VERSION @PACKAGE_VERSION@)

# Find the dependencies
include(CMakeFindDependencyMacro)

find_dependency(TelepathyQt@QT_VERSION_MAJOR@)

# set the directories
if(TARGET TelepathyQt@QT_VERSION_MAJOR@::Service)
    # set the LIBRARIES variable
    get_target_property(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_LIBRARIES
        TelepathyQt@QT_VERSION_MAJOR@::Service
        IMPORTED_LOCATION
    )

    if(NOT TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_LIBRARIES)
        # If there is no default IMPORTED_LOCATION then get all configurations...
        get_target_property(_IMPORTED_CONFIGURATIONS
            TelepathyQt@QT_VERSION_MAJOR@::Service
            IMPORTED_CONFIGURATIONS
        )
        # ... and pick up the first one
        list(GET _IMPORTED_CONFIGURATIONS 0 _SELECTED_CONFIGURATION)
        get_target_property(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_LIBRARIES
            TelepathyQt@QT_VERSION_MAJOR@::Service
            IMPORTED_LOCATION_${_SELECTED_CONFIGURATION}
        )
        unset(_IMPORTED_CONFIGURATIONS)
        unset(_SELECTED_CONFIGURATION)
    endif()

    message(STATUS "TELEPATHY_QT_SERVICE_LIBRARIES Libs: ${TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_LIBRARIES}")
    get_target_property(TELEPATHY_QT@QT_VERSION_MAJOR@_SERVICE_INCLUDE_DIR
        TelepathyQt@QT_VERSION_MAJOR@::Service
        INTERFACE_INCLUDE_DIRECTORIES
    )
endif()
