cmake_minimum_required(VERSION 3.1.0)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

if(CMAKE_VERSION VERSION_LESS "3.7.0")
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()

if(NOT QV_QT_LIBNAME)
    set(QV_QT_LIBNAME Qt5)
endif()

if(QVPLUGIN_HAS_HTTP_TO_SOCKS_HELPER)
    find_package(${QV_QT_LIBNAME} COMPONENTS Network REQUIRED)
    list(APPEND QVPLUGIN_INTERFACE_LIBS ${QV_QT_LIBNAME}::Network)
    set(QVPLUGIN_HTTP_TO_SOCKS_FILES
        ${CMAKE_CURRENT_LIST_DIR}/utils/HttpProxy.hpp
        ${CMAKE_CURRENT_LIST_DIR}/utils/SocketStream.hpp
        )
endif()

set(QVPLUGIN_INTERFACE_HEADERS
    ${QVPLUGIN_HTTP_TO_SOCKS_FILES}
    ${CMAKE_CURRENT_LIST_DIR}/QvPluginBase.hpp
    ${CMAKE_CURRENT_LIST_DIR}/QvPluginInterface.hpp
    ${CMAKE_CURRENT_LIST_DIR}/QvPluginInterfaceModels.hpp
    ${CMAKE_CURRENT_LIST_DIR}/QvPluginProcessor.hpp)
set(QVPLUGIN_INTERFACE_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR})
