Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Simple Example

# Generated from simple.pro.

cmake_minimum_required(VERSION 3.16)
project(simple LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples/httpserver/simple")

find_package(Qt6 COMPONENTS HttpServer)

qt_add_executable(simple
    main.cpp
)
target_link_libraries(simple PUBLIC
    Qt::HttpServer
)

# Resources:
set(assets_resource_files
    "assets/certificate.crt"
    "assets/private.key"
    "assets/qt-logo.png"
)

qt6_add_resources(simple "assets"
    PREFIX
        "/"
    FILES
        ${assets_resource_files}
)

install(TARGETS simple
    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded