Files
hdmiviewer/CMakeLists.txt

66 lines
1.6 KiB
CMake
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
cmake_minimum_required(VERSION 3.16)
project(HDMIViewer VERSION 1.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# Qt6 – Gui enthält den JPEG-Plugin-Support (QImage::fromData)
# OpenGLWidgets für das GPU-beschleunigte Video-Rendering (Bildglättung/Retro-Optik)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets OpenGL OpenGLWidgets Svg)
# Svg: Programm-Icon (assets/hdmi-viewer.svg) wird als SVG geladen
# ALSA
find_package(PkgConfig REQUIRED)
pkg_check_modules(ALSA REQUIRED alsa)
# V4L2 Header-Check
include(CheckIncludeFileCXX)
check_include_file_cxx("linux/videodev2.h" HAVE_V4L2)
if(NOT HAVE_V4L2)
message(FATAL_ERROR "linux/videodev2.h nicht gefunden.")
endif()
set(SOURCES
src/main.cpp
src/MainWindow.cpp
src/VideoWidget.cpp
src/DeviceDialog.cpp
src/Profile.cpp
src/AudioThread.cpp
src/CaptureThread.cpp
resources.qrc
)
add_executable(hdmi-viewer ${SOURCES})
target_link_libraries(hdmi-viewer
PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Widgets
Qt6::OpenGL
Qt6::OpenGLWidgets
Qt6::Svg
${ALSA_LIBRARIES}
)
target_include_directories(hdmi-viewer PRIVATE
${ALSA_INCLUDE_DIRS}
src
)
target_compile_options(hdmi-viewer PRIVATE
${ALSA_CFLAGS_OTHER}
-Wall -Wextra
)
install(TARGETS hdmi-viewer DESTINATION bin)
# Startmenü-Eintrag und Icon (Cinnamon/GNOME/KDE lesen beides aus share/)
install(FILES hdmi-viewer.desktop DESTINATION share/applications)
install(FILES assets/hdmi-viewer.svg
DESTINATION share/icons/hicolor/scalable/apps)