Skip to content

Commit

Permalink
CMake: Make qmlglsink Private
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Apr 22, 2024
1 parent ea08ff7 commit 550d0cf
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 26 deletions.
3 changes: 0 additions & 3 deletions libs/CMakeLists.txt

This file was deleted.

3 changes: 0 additions & 3 deletions libs/qmlglsink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ if(QGC_ENABLE_VIDEOSTREAMING)
PRIVATE
HAVE_QT_QPA_HEADER
QT_QPA_HEADER=<QtGui/qpa/qplatformnativeinterface.h>
PUBLIC
QGC_GST_STREAMING
QGC_CMAKE_GST
)
if(LINUX)
target_compile_definitions(qmlglsink PRIVATE HAVE_QT_X11)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if(ANDROID)

target_link_libraries(qgc
PUBLIC
qtandroidserialport
Qt6::CorePrivate
)

target_include_directories(qgc PUBLIC ${CMAKE_SOURCE_DIR}/android/src)
Expand Down
2 changes: 2 additions & 0 deletions src/Vehicle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions src/VideoReceiver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
find_package(Qt6 REQUIRED COMPONENTS Core Multimedia)
find_package(Qt6 REQUIRED COMPONENTS Core)

qt_add_library(VideoReceiver STATIC
VideoReceiver.h
)

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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/VideoReceiver/GStreamer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author Gus Grubba <[email protected]>
*/

#include <QDebug>
#include <QtCore/QDebug>

#include "GStreamer.h"
#include "GstVideoReceiver.h"
Expand Down
5 changes: 3 additions & 2 deletions src/VideoReceiver/GStreamer.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#pragma once

#include <QtCore/QLoggingCategory>
#include <QQuickItem>
#include <QtQuick/QQuickItem>

#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);
Expand Down
6 changes: 3 additions & 3 deletions src/VideoReceiver/GstVideoReceiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "GstVideoReceiver.h"
#include "QGCLoggingCategory.h"

#include <QDebug>
#include <QUrl>
#include <QDateTime>
#include <QtCore/QDebug>
#include <QtCore/QUrl>
#include <QtCore/QDateTime>

QGC_LOGGING_CATEGORY(VideoReceiverLog, "VideoReceiverLog")

Expand Down
10 changes: 5 additions & 5 deletions src/VideoReceiver/GstVideoReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#pragma once

#include <QtCore/QLoggingCategory>
#include <QTimer>
#include <QThread>
#include <QWaitCondition>
#include <QMutex>
#include <QQueue>
#include <QtCore/QTimer>
#include <QtCore/QThread>
#include <QtCore/QWaitCondition>
#include <QtCore/QMutex>
#include <QtCore/QQueue>

#include "VideoReceiver.h"

Expand Down
4 changes: 2 additions & 2 deletions src/VideoReceiver/VideoReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#pragma once

#include <QObject>
#include <QSize>
#include <QtCore/QObject>
#include <QtCore/QSize>

class VideoReceiver : public QObject
{
Expand Down
2 changes: 2 additions & 0 deletions src/comm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 550d0cf

Please sign in to comment.