# Copyright © 2019-2025 Collabora Ltd.
# SPDX-License-Identifier: BSD-3-Clause
# (See debian/copyright)

cmake_minimum_required(VERSION 3.18)
project(HelloOgg)
include(CTest)

include(FindPkgConfig)
pkg_check_modules(OGG REQUIRED IMPORTED_TARGET ogg)
pkg_check_modules(VORBIS REQUIRED IMPORTED_TARGET vorbis)
pkg_check_modules(VORBISENC REQUIRED IMPORTED_TARGET vorbisenc)
pkg_check_modules(VORBISFILE REQUIRED IMPORTED_TARGET vorbisfile)

add_executable(hello-ogg hello-ogg.c)
target_link_libraries(hello-ogg PkgConfig::OGG)
add_test(NAME hello-ogg COMMAND hello-ogg)

add_executable(hello-vorbis hello-vorbis.c)
target_link_libraries(hello-vorbis PkgConfig::VORBIS)
add_test(NAME hello-vorbis COMMAND hello-vorbis)

add_executable(hello-vorbisenc hello-vorbisenc.c)
target_link_libraries(hello-vorbisenc PkgConfig::VORBISENC PkgConfig::VORBIS)
add_test(NAME hello-vorbisenc COMMAND hello-vorbisenc)

add_executable(hello-vorbisfile hello-vorbisfile.c)
target_link_libraries(hello-vorbisfile PkgConfig::VORBISFILE)
add_test(NAME hello-vorbisfile COMMAND hello-vorbisfile)
