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


####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was TelepathyQtServiceConfig.cmake.in                            ########

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

macro(set_and_check _var _file)
  set(${_var} "${_file}")
  if(NOT EXISTS "${_file}")
    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  endif()
endmacro()

####################################################################################

# set the version number
set(TELEPATHY_QT5_SERVICE_VERSION_MAJOR 0)
set(TELEPATHY_QT5_SERVICE_VERSION_MINOR 9)
set(TELEPATHY_QT5_SERVICE_VERSION_MICRO 8)
set(TELEPATHY_QT5_SERVICE_VERSION_NANO 0)
set(TELEPATHY_QT5_SERVICE_VERSION 0.9.8)

# Find the dependencies
include(CMakeFindDependencyMacro)

find_dependency(TelepathyQt5)

# set the directories
if(TARGET TelepathyQt5::Service)
    # set the LIBRARIES variable
    get_target_property(TELEPATHY_QT5_SERVICE_LIBRARIES
        TelepathyQt5::Service
        IMPORTED_LOCATION
    )

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

    message(STATUS "TELEPATHY_QT_SERVICE_LIBRARIES Libs: ${TELEPATHY_QT5_SERVICE_LIBRARIES}")
    get_target_property(TELEPATHY_QT5_SERVICE_INCLUDE_DIR
        TelepathyQt5::Service
        INTERFACE_INCLUDE_DIRECTORIES
    )
endif()
