From 4077fc18c5167cac0cfa94071da6b2f2b9c4fe36 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 25 Oct 2018 14:55:42 -0400 Subject: [PATCH] cmake create VideoStreaming library in src/VideoStreaming --- src/CMakeLists.txt | 45 ++++--------------------------- src/VideoStreaming/CMakeLists.txt | 39 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 src/VideoStreaming/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6cfe725ed..d7de65097 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,7 +16,6 @@ include_directories( Terrain uas Vehicle - VideoStreaming ViewWidgets ) @@ -107,45 +106,12 @@ if(BUILD_TESTING) endif() -if (VIDEO) - list(APPEND QGC_SRC - VideoStreaming/gstqtvideosink/delegates/basedelegate.cpp - VideoStreaming/gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp - VideoStreaming/gstqtvideosink/delegates/qtvideosinkdelegate.cpp - VideoStreaming/gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp - VideoStreaming/gstqtvideosink/gstqtglvideosink.cpp - VideoStreaming/gstqtvideosink/gstqtglvideosinkbase.cpp - VideoStreaming/gstqtvideosink/gstqtquick2videosink.cpp - VideoStreaming/gstqtvideosink/gstqtvideosink.cpp - VideoStreaming/gstqtvideosink/gstqtvideosinkbase.cpp - VideoStreaming/gstqtvideosink/gstqtvideosinkplugin.cpp - VideoStreaming/gstqtvideosink/gstqwidgetvideosink.cpp - VideoStreaming/gstqtvideosink/painters/genericsurfacepainter.cpp - VideoStreaming/gstqtvideosink/painters/openglsurfacepainter.cpp - VideoStreaming/gstqtvideosink/painters/videomaterial.cpp - VideoStreaming/gstqtvideosink/painters/videonode.cpp - VideoStreaming/gstqtvideosink/utils/bufferformat.cpp - VideoStreaming/gstqtvideosink/utils/utils.cpp - ) -endif() - -set(QGC_RESOURCES) -list(APPEND QGC_RESOURCES - -) - if(BUILD_TESTING) list(APPEND QGC_RESOURCES UnitTest.qrc ) endif() - -set(QGC_UI) -list(APPEND QGC_UI - QGCQmlWidgetHolder.ui -) - add_library(qgc ${QGC_RESOURCES} @@ -182,11 +148,6 @@ add_library(qgc Vehicle/MultiVehicleManager.cc Vehicle/Vehicle.cc - VideoStreaming/VideoItem.cc - VideoStreaming/VideoReceiver.cc - VideoStreaming/VideoStreaming.cc - VideoStreaming/VideoSurface.cc - ViewWidgets/CustomCommandWidget.cc ViewWidgets/CustomCommandWidgetController.cc ViewWidgets/ViewWidgetController.cc @@ -220,6 +181,9 @@ add_library(qgc uas/UAS.h uas/UASInterface.h + # UI + QGCQmlWidgetHolder.ui + ) set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION="${git_tag}") @@ -240,7 +204,7 @@ add_subdirectory(QmlControls) add_subdirectory(QtLocationPlugin) add_subdirectory(Settings) add_subdirectory(VehicleSetup) - +add_subdirectory(VideoStreaming) target_link_libraries(qgc @@ -277,6 +241,7 @@ target_link_libraries(qgc Settings ui VehicleSetup + VideoStreaming ) target_include_directories(qgc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/VideoStreaming/CMakeLists.txt b/src/VideoStreaming/CMakeLists.txt new file mode 100644 index 000000000..57028a9d9 --- /dev/null +++ b/src/VideoStreaming/CMakeLists.txt @@ -0,0 +1,39 @@ + +set(EXTRA_SRC) +if(VIDEO) + list(APPEND EXTRA_SRC + gstqtvideosink/delegates/basedelegate.cpp + gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp + gstqtvideosink/delegates/qtvideosinkdelegate.cpp + gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp + gstqtvideosink/gstqtglvideosink.cpp + gstqtvideosink/gstqtglvideosinkbase.cpp + gstqtvideosink/gstqtquick2videosink.cpp + gstqtvideosink/gstqtvideosink.cpp + gstqtvideosink/gstqtvideosinkbase.cpp + gstqtvideosink/gstqtvideosinkplugin.cpp + gstqtvideosink/gstqwidgetvideosink.cpp + gstqtvideosink/painters/genericsurfacepainter.cpp + gstqtvideosink/painters/openglsurfacepainter.cpp + gstqtvideosink/painters/videomaterial.cpp + gstqtvideosink/painters/videonode.cpp + gstqtvideosink/utils/bufferformat.cpp + gstqtvideosink/utils/utils.cpp + ) +endif() + +add_library(VideoStreaming + VideoItem.cc + VideoReceiver.cc + VideoStreaming.cc + VideoSurface.cc + ${EXTRA_SRC} +) + +target_link_libraries(VideoStreaming + PUBLIC + qgc +) + +target_include_directories(VideoStreaming PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + -- 2.22.0