cmake_minimum_required(VERSION 3.16)
project(zenohc_examples LANGUAGES C)
find_package(zenohc REQUIRED)

file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.c")

# This list is used to skip some examples if necessary
set(zenoh_examples_unsupported "")


foreach(file ${files})
    get_filename_component(target ${file} NAME_WE)
    if(NOT ${target} IN_LIST  zenoh_examples_unsupported)
        add_executable(${target} ${file})
        target_link_libraries(${target} PRIVATE zenohc::lib)
    endif()
endforeach()
