cmake_minimum_required(VERSION 3.2)

project({{{packageName}}})

find_package(Qt5 REQUIRED COMPONENTS Core Network Gui)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

add_library(${PROJECT_NAME}
{{#models}}
{{#model}}
  {{classname}}.h
{{/model}}
{{/models}}
{{#apiInfo}}
{{#apis}}
{{#operations}}
  {{classname}}.h
{{/operations}}
{{/apis}}
{{/apiInfo}}
  {{prefix}}Helpers.h
  {{prefix}}HttpRequest.h
  {{prefix}}Object.h
  {{prefix}}Enum.h
  {{prefix}}HttpFileElement.h
  {{prefix}}ServerConfiguration.h
  {{prefix}}ServerVariable.h
  {{prefix}}Oauth.h
{{#models}}
{{#model}}
  {{classname}}.cpp
{{/model}}
{{/models}}
{{#apiInfo}}
{{#apis}}
{{#operations}}
  {{classname}}.cpp
{{/operations}}
{{/apis}}
{{/apiInfo}}
  {{prefix}}Helpers.cpp
  {{prefix}}HttpRequest.cpp
  {{prefix}}HttpFileElement.cpp
  {{prefix}}Oauth.cpp
  )

target_include_directories(${PROJECT_NAME}
    PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(${PROJECT_NAME}
    PUBLIC
        Qt5::Core
        Qt5::Network
        Qt5::Gui
    {{#contentCompression}}
    PRIVATE
        ${ZLIB_LIBRARIES}{{/contentCompression}}
)
