# SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.28.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(server_h3)

set(BASE_PATH "../../../../../subsys/net/lib/http/")
include_directories(${BASE_PATH}/headers)

file(GLOB app_sources src/main.c)
target_sources(app PRIVATE ${app_sources})

set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)

foreach(inc_file
  ca.crt
  server.crt
  server.key
  client.crt
  client.key
)
  generate_inc_file_for_target(app
    ${ZEPHYR_BASE}/tests/net/lib/quic/certs/${inc_file}
    ${gen_dir}/${inc_file}.inc
  )
endforeach()

target_include_directories(app PRIVATE ${ZEPHYR_BASE}/tests/net/lib/quic/certs)

target_link_libraries(app PRIVATE zephyr_interface zephyr)

zephyr_linker_sources(SECTIONS sections-rom.ld)
zephyr_iterable_section(NAME http_resource_desc_test_http_service KVMA RAM_REGION GROUP RODATA_REGION)
