Skip to content

Commit af06849

Browse files
committed
CMake: Fix GimbalController Linking
1 parent 96f2b4f commit af06849

File tree

7 files changed

+36
-5
lines changed

7 files changed

+36
-5
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ add_subdirectory(FirmwarePlugin)
3333
# add_subdirectory(FlightMap)
3434
add_subdirectory(FollowMe)
3535
add_subdirectory(Geo)
36+
add_subdirectory(Gimbal)
3637
add_subdirectory(GPS)
3738
add_subdirectory(Joystick)
3839
add_subdirectory(MAVLink)
@@ -76,6 +77,7 @@ target_link_libraries(QGC
7677
# FlightMap
7778
# FlightDisplay
7879
FollowMe
80+
Gimbal
7981
GPS
8082
Joystick
8183
MAVLink

src/Gimbal/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
find_package(Qt6 REQUIRED COMPONENTS Core Positioning)
2+
3+
qt_add_library(Gimbal STATIC
4+
GimbalController.cc
5+
GimbalController.h
6+
)
7+
8+
target_link_libraries(Gimbal
9+
PRIVATE
10+
Comms
11+
QGC
12+
Settings
13+
Utilities
14+
Vehicle
15+
PUBLIC
16+
Qt6::Core
17+
FactSystem
18+
MAVLink
19+
QmlControls
20+
)
21+
22+
target_include_directories(Gimbal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

src/Gimbal/GimbalController.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "SettingsManager.h"
1414
#include "QGCLoggingCategory.h"
1515
#include "ParameterManager.h"
16+
#include "MAVLinkProtocol.h"
1617

1718
#include <QtQml/QQmlEngine>
1819

src/Gimbal/GimbalController.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99

1010
#pragma once
1111

12-
#include <QLoggingCategory>
13-
#include <cstdint>
14-
#include "Vehicle.h"
15-
#include "QmlObjectListModel.h"
16-
#include "MAVLinkProtocol.h"
12+
#include <QtCore/QLoggingCategory>
13+
14+
#include <QmlObjectListModel.h>
15+
#include <FactGroup.h>
16+
#include <MAVLinkLib.h>
1717

1818
Q_DECLARE_LOGGING_CATEGORY(GimbalLog)
1919

2020
class MavlinkProtocol;
21+
class Vehicle;
22+
class MAVLinkProtocol;
2123

2224
class Gimbal : public FactGroup
2325
{

src/Joystick/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ target_link_libraries(Joystick
5656
PRIVATE
5757
Qt6::Qml
5858
FirmwarePlugin
59+
Gimbal
5960
Settings
6061
Utilities
6162
Vehicle

src/Settings/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ qt_add_library(Settings STATIC
2323
FlightModeSettings.h
2424
FlyViewSettings.cc
2525
FlyViewSettings.h
26+
GimbalControllerSettings.cc
27+
GimbalControllerSettings.h
2628
OfflineMapsSettings.cc
2729
OfflineMapsSettings.h
2830
PlanViewSettings.cc

src/Vehicle/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ target_link_libraries(Vehicle
5353
Qt6::Positioning
5454
Comms
5555
FactSystem
56+
Gimbal
5657
LibEventsWrapper
5758
MAVLink
5859
MissionManager

0 commit comments

Comments
 (0)