cmake_minimum_required(VERSION 3.19) project(gstreamerViewer LANGUAGES CXX) find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets) find_package(PkgConfig REQUIRED) pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0 gstreamer-video-1.0 gstreamer-app-1.0) qt_standard_project_setup() qt_add_executable(gstreamerViewer WIN32 MACOSX_BUNDLE main.cpp mainwindow.cpp mainwindow.h mainwindow.ui socketclient.cpp socketclient.h gstreamerpipelinewidget.cpp gstreamerpipelinewidget.h cameracontrolwidget.cpp cameracontrolwidget.h videoviewerwidget.cpp videoviewerwidget.h aboutwidget.cpp aboutwidget.h ) target_include_directories(gstreamerViewer PRIVATE ${GSTREAMER_INCLUDE_DIRS}) target_link_libraries(gstreamerViewer PRIVATE Qt::Core Qt::Widgets ${GSTREAMER_LIBRARIES} ) include(GNUInstallDirs) install(TARGETS gstreamerViewer BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) qt_generate_deploy_app_script( TARGET gstreamerViewer OUTPUT_SCRIPT deploy_script NO_UNSUPPORTED_PLATFORM_ERROR ) install(SCRIPT ${deploy_script})