diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt deleted file mode 100644 index 3d14025cfd33..000000000000 --- a/libs/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_subdirectory(libevents) -add_subdirectory(qtandroidserialport) -add_subdirectory(qmlglsink) diff --git a/libs/qmlglsink/CMakeLists.txt b/libs/qmlglsink/CMakeLists.txt index 4fb6af35b2ed..5e2177fe92ea 100644 --- a/libs/qmlglsink/CMakeLists.txt +++ b/libs/qmlglsink/CMakeLists.txt @@ -208,9 +208,6 @@ if(QGC_ENABLE_VIDEOSTREAMING) PRIVATE HAVE_QT_QPA_HEADER QT_QPA_HEADER= - PUBLIC - QGC_GST_STREAMING - QGC_CMAKE_GST ) if(LINUX) target_compile_definitions(qmlglsink PRIVATE HAVE_QT_X11) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d992aef22a78..6a450b83d02f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -93,7 +93,7 @@ if(ANDROID) target_link_libraries(qgc PUBLIC - qtandroidserialport + Qt6::CorePrivate ) target_include_directories(qgc PUBLIC ${CMAKE_SOURCE_DIR}/android/src) diff --git a/src/Vehicle/CMakeLists.txt b/src/Vehicle/CMakeLists.txt index 8edc90b60877..990753a00774 100644 --- a/src/Vehicle/CMakeLists.txt +++ b/src/Vehicle/CMakeLists.txt @@ -95,6 +95,8 @@ qt_add_library(Vehicle STATIC VehicleHygrometerFactGroup.h ) +add_subdirectory(${CMAKE_SOURCE_DIR}/libs/libevents libevents.build) + target_link_libraries(Vehicle PRIVATE Audio diff --git a/src/VideoReceiver/CMakeLists.txt b/src/VideoReceiver/CMakeLists.txt index ee8c91096737..3a97be54a3b2 100644 --- a/src/VideoReceiver/CMakeLists.txt +++ b/src/VideoReceiver/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt6 REQUIRED COMPONENTS Core Multimedia) +find_package(Qt6 REQUIRED COMPONENTS Core) qt_add_library(VideoReceiver STATIC VideoReceiver.h @@ -6,15 +6,16 @@ qt_add_library(VideoReceiver STATIC target_link_libraries(VideoReceiver PUBLIC - Qt6::Multimedia - Qt6::OpenGL - Qt6::Quick - Utilities + Qt6::Core ) target_include_directories(VideoReceiver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +add_subdirectory(${CMAKE_SOURCE_DIR}/libs/qmlglsink qmlglsink.build) + if(GST_FOUND) + find_package(Qt6 REQUIRED COMPONENTS Quick) + target_sources(VideoReceiver PRIVATE gstqgc.c @@ -26,11 +27,16 @@ if(GST_FOUND) ) target_link_libraries(VideoReceiver - PUBLIC + PRIVATE qmlglsink + Utilities + PUBLIC + Qt6::Quick Settings ) + target_compile_definitions(VideoReceiver PUBLIC QGC_GST_STREAMING) + if(CMAKE_BUILD_TYPE STREQUAL "Release") target_compile_definitions(VideoReceiver PRIVATE QGC_INSTALL_RELEASE) endif() diff --git a/src/VideoReceiver/GStreamer.cc b/src/VideoReceiver/GStreamer.cc index 743994437abd..11a225e6f4d5 100644 --- a/src/VideoReceiver/GStreamer.cc +++ b/src/VideoReceiver/GStreamer.cc @@ -14,7 +14,7 @@ * @author Gus Grubba */ -#include +#include #include "GStreamer.h" #include "GstVideoReceiver.h" diff --git a/src/VideoReceiver/GStreamer.h b/src/VideoReceiver/GStreamer.h index fd4515431ead..29c4fdbb8b93 100644 --- a/src/VideoReceiver/GStreamer.h +++ b/src/VideoReceiver/GStreamer.h @@ -1,14 +1,15 @@ #pragma once #include -#include +#include #include "Settings/VideoDecoderOptions.h" -#include "VideoReceiver.h" Q_DECLARE_LOGGING_CATEGORY(GStreamerLog) Q_DECLARE_LOGGING_CATEGORY(GStreamerAPILog) +class VideoReceiver; + class GStreamer { public: static void blacklist(VideoDecoderOptions option); diff --git a/src/VideoReceiver/GstVideoReceiver.cc b/src/VideoReceiver/GstVideoReceiver.cc index 7e83fd62558c..820ccf6be0e7 100644 --- a/src/VideoReceiver/GstVideoReceiver.cc +++ b/src/VideoReceiver/GstVideoReceiver.cc @@ -17,9 +17,9 @@ #include "GstVideoReceiver.h" #include "QGCLoggingCategory.h" -#include -#include -#include +#include +#include +#include QGC_LOGGING_CATEGORY(VideoReceiverLog, "VideoReceiverLog") diff --git a/src/VideoReceiver/GstVideoReceiver.h b/src/VideoReceiver/GstVideoReceiver.h index 61d8262aba78..367e85ac7aaa 100644 --- a/src/VideoReceiver/GstVideoReceiver.h +++ b/src/VideoReceiver/GstVideoReceiver.h @@ -16,11 +16,11 @@ #pragma once #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "VideoReceiver.h" diff --git a/src/VideoReceiver/VideoReceiver.h b/src/VideoReceiver/VideoReceiver.h index 7e2a272d3c95..1cf04cdc9326 100644 --- a/src/VideoReceiver/VideoReceiver.h +++ b/src/VideoReceiver/VideoReceiver.h @@ -15,8 +15,8 @@ #pragma once -#include -#include +#include +#include class VideoReceiver : public QObject { diff --git a/src/comm/CMakeLists.txt b/src/comm/CMakeLists.txt index 88eb9b928ab8..e2bb70a55ad9 100644 --- a/src/comm/CMakeLists.txt +++ b/src/comm/CMakeLists.txt @@ -52,6 +52,8 @@ target_link_libraries(comm ) if(ANDROID) + add_subdirectory(${CMAKE_SOURCE_DIR}/libs/qtandroidserialport qtandroidserialport.build) + target_link_libraries(comm PUBLIC qtandroidserialport) else() target_link_libraries(comm PUBLIC Qt6::SerialPort)