Hereby I use the setup and framework from last year's FrOSCon talk to bootstrap the demo example code for the talk at FrOSCon-26 Notably, the modern OpenGL output pipeline based on EGL is intended for reuse. Insights in this code were based essentially on existing code bases under GPL. Furthermore, using GPL is seen as a statement in support of "The Commons"
49 lines
1.7 KiB
CMake
49 lines
1.7 KiB
CMake
#
|
||
# CMake-Build for a demo code to use io_uring and output video
|
||
#
|
||
# Copyright 2025,2026 Hermann Vosseler <Ichthyostega@web.de>
|
||
#
|
||
# This program is free software; you can redistribute it and/or modify it
|
||
# under the terms of the GNU GPL version 2+ See the LICENSE file for details.
|
||
#
|
||
cmake_minimum_required (VERSION 3.20)
|
||
|
||
# default to Debug build type, unless specified in cache or command line
|
||
if (NOT CMAKE_BUILD_TYPE)
|
||
set (CMAKE_BUILD_TYPE Debug CACHE STRING "Default to Debug build")
|
||
set (CMAKE_VERBOSE_MAKEFILE TRUE CACHE STRING "Show full compile commands")
|
||
endif()
|
||
# optimise debugging symbols for GNU gdb
|
||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb3" CACHE STRING "Special option for debug builds")
|
||
|
||
|
||
|
||
project(
|
||
DemoUringVid
|
||
VERSION 1.0
|
||
LANGUAGES CXX
|
||
)
|
||
|
||
add_compile_options("-Wall")
|
||
|
||
# dependencies via pkg-config
|
||
find_package(PkgConfig REQUIRED)
|
||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtkmm-3.0>=3.20)
|
||
pkg_check_modules(XLIB REQUIRED IMPORTED_TARGET x11>=1.7)
|
||
pkg_check_modules(EGL REQUIRED IMPORTED_TARGET egl>=1.5)
|
||
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew>=2.2)
|
||
|
||
|
||
|
||
# build complete source tree (detect changes on rebuild)
|
||
file(GLOB_RECURSE demo_uring_sources CONFIGURE_DEPENDS "*.cpp")
|
||
file(GLOB_RECURSE demo_uring_headers CONFIGURE_DEPENDS "*.hpp")
|
||
|
||
add_executable(demo_uring ${demo_uring_sources} ${demo_uring_headers})
|
||
target_compile_features(demo_uring PUBLIC cxx_std_17)
|
||
target_include_directories(demo_uring PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||
target_link_libraries(demo_uring PRIVATE PkgConfig::GTK)
|
||
target_link_libraries(demo_uring PRIVATE PkgConfig::XLIB)
|
||
target_link_libraries(demo_uring PRIVATE PkgConfig::EGL)
|
||
target_link_libraries(demo_uring PRIVATE PkgConfig::GLEW)
|
||
|