cmake_minimum_required(VERSION 3.10)
project(Argtable3Sample C)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)

# Find the argtable3 package.
# The CONFIG mode tells CMake to look for the CMake configuration files
# (argtable3Config.cmake or argtable3-config.cmake) that vcpkg generates.
# The `REQUIRED` keyword will make CMake fail if the package is not found.
find_package(Argtable3 CONFIG REQUIRED)

add_executable(sample sample.c)

# Link your sample executable against the imported target from argtable3.
# vcpkg typically provides an imported target like PkgName::PkgName or PkgName::pkgname.
# For argtable3, it's argtable3::argtable3.
target_link_libraries(sample PRIVATE argtable3::argtable3)
