Skip to content

Commit

Permalink
Move files into their appropriate modules
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey authored and DonLakeFlyer committed Mar 3, 2024
1 parent 1b1eea2 commit 58c3cb9
Show file tree
Hide file tree
Showing 43 changed files with 104 additions and 95 deletions.
69 changes: 36 additions & 33 deletions qgroundcontrol.pro
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ INCLUDEPATH += \
src/ui/toolbar \
src/ui/uas \
src/Viewer3D \
src/Utilities

#
# Plugin API
Expand Down Expand Up @@ -440,9 +441,9 @@ HEADERS += \
src/Joystick/Joystick.h \
src/Joystick/JoystickManager.h \
src/Joystick/JoystickMavCommand.h \
src/JsonHelper.h \
src/KMLDomDocument.h \
src/KMLHelper.h \
src/Utilities/JsonHelper.h \
src/MissionManager/KMLDomDocument.h \
src/MissionManager/KMLHelper.h \
src/MissionManager/CameraCalc.h \
src/MissionManager/CameraSection.h \
src/MissionManager/CameraSpec.h \
Expand Down Expand Up @@ -495,16 +496,16 @@ HEADERS += \
src/Geo/MGRS.hpp \
src/Geo/TransverseMercator.hpp \
src/Geo/PolarStereographic.hpp \
src/QGC.h \
src/Utilities/QGC.h \
src/QGCApplication.h \
src/QGCCachedFileDownload.h \
src/Utilities/QGCCachedFileDownload.h \
src/QGCConfig.h \
src/QGCFileDownload.h \
src/QGCLoggingCategory.h \
src/QGCMapPalette.h \
src/QGCPalette.h \
src/QGCQGeoCoordinate.h \
src/QGCTemporaryFile.h \
src/Utilities/QGCFileDownload.h \
src/Utilities/QGCLoggingCategory.h \
src/QmlControls/QGCMapPalette.h \
src/QmlControls/QGCPalette.h \
src/Utilities/QGCQGeoCoordinate.h \
src/Utilities/QGCTemporaryFile.h \
src/QGCToolbox.h \
src/QmlControls/AppMessages.h \
src/QmlControls/EditPositionDialogController.h \
Expand Down Expand Up @@ -543,10 +544,10 @@ HEADERS += \
src/Settings/SettingsManager.h \
src/Settings/UnitsSettings.h \
src/Settings/VideoSettings.h \
src/ShapeFileHelper.h \
src/SHPFileHelper.h \
src/Utilities/ShapeFileHelper.h \
src/Utilities/SHPFileHelper.h \
src/Terrain/TerrainQuery.h \
src/TerrainTile.h \
src/Terrain/TerrainTile.h \
src/Vehicle/Actuators/ActuatorActions.h \
src/Vehicle/Actuators/Actuators.h \
src/Vehicle/Actuators/ActuatorOutputs.h \
Expand Down Expand Up @@ -607,7 +608,7 @@ HEADERS += \
src/comm/TCPLink.h \
src/comm/UDPLink.h \
src/comm/UdpIODevice.h \
src/uas/UASMessageHandler.h \
src/Vehicle/UASMessageHandler.h \
src/AnalyzeView/GeoTagController.h \
src/AnalyzeView/ExifParser.h \
src/Viewer3D/CityMapGeometry.h \
Expand Down Expand Up @@ -670,13 +671,15 @@ HEADERS += \

iOSBuild {
OBJECTIVE_SOURCES += \
src/MobileScreenMgr.mm \
src/Utilities/MobileScreenMgr.mm \
}

AndroidBuild {
SOURCES += \
src/MobileScreenMgr.cc \
src/Joystick/JoystickAndroid.cc \
src/Utilities/MobileScreenMgr.cc \
src/Joystick/JoystickAndroid.cc

HEADERS += src/Utilities/MobileScreenMgr.h
}

SOURCES += \
Expand All @@ -700,9 +703,9 @@ SOURCES += \
src/Joystick/Joystick.cc \
src/Joystick/JoystickManager.cc \
src/Joystick/JoystickMavCommand.cc \
src/JsonHelper.cc \
src/KMLDomDocument.cc \
src/KMLHelper.cc \
src/Utilities/JsonHelper.cc \
src/MissionManager/KMLDomDocument.cc \
src/MissionManager/KMLHelper.cc \
src/MissionManager/CameraCalc.cc \
src/MissionManager/CameraSection.cc \
src/MissionManager/CameraSpec.cc \
Expand Down Expand Up @@ -753,15 +756,15 @@ SOURCES += \
src/Geo/MGRS.cpp \
src/Geo/TransverseMercator.cpp \
src/Geo/PolarStereographic.cpp \
src/QGC.cc \
src/Utilities/QGC.cc \
src/QGCApplication.cc \
src/QGCCachedFileDownload.cc \
src/QGCFileDownload.cc \
src/QGCLoggingCategory.cc \
src/QGCMapPalette.cc \
src/QGCPalette.cc \
src/QGCQGeoCoordinate.cc \
src/QGCTemporaryFile.cc \
src/Utilities/QGCCachedFileDownload.cc \
src/Utilities/QGCFileDownload.cc \
src/Utilities/QGCLoggingCategory.cc \
src/QmlControls/QGCMapPalette.cc \
src/QmlControls/QGCPalette.cc \
src/Utilities/QGCQGeoCoordinate.cc \
src/Utilities/QGCTemporaryFile.cc \
src/QGCToolbox.cc \
src/QmlControls/AppMessages.cc \
src/QmlControls/EditPositionDialogController.cc \
Expand Down Expand Up @@ -800,10 +803,10 @@ SOURCES += \
src/Settings/SettingsManager.cc \
src/Settings/UnitsSettings.cc \
src/Settings/VideoSettings.cc \
src/ShapeFileHelper.cc \
src/SHPFileHelper.cc \
src/Utilities/ShapeFileHelper.cc \
src/Utilities/SHPFileHelper.cc \
src/Terrain/TerrainQuery.cc \
src/TerrainTile.cc\
src/Terrain/TerrainTile.cc \
src/Vehicle/Actuators/ActuatorActions.cc \
src/Vehicle/Actuators/Actuators.cc \
src/Vehicle/Actuators/ActuatorOutputs.cc \
Expand Down Expand Up @@ -865,7 +868,7 @@ SOURCES += \
src/comm/UDPLink.cc \
src/comm/UdpIODevice.cc \
src/main.cc \
src/uas/UASMessageHandler.cc \
src/Vehicle/UASMessageHandler.cc \
src/AnalyzeView/GeoTagController.cc \
src/AnalyzeView/ExifParser.cc \
src/Viewer3D/CityMapGeometry.cc \
Expand Down
48 changes: 2 additions & 46 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,20 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)

#######################################################
# Mobile Specific Sources
#######################################################
set(EXTRA_SRC)

if (MOBILE)
list(APPEND EXTRA_SRC
MobileScreenMgr.cc
MobileScreenMgr.h
)
endif ()

#######################################################
# Source Files
#######################################################
qt_add_library(${PROJECT_NAME} STATIC
${EXTRA_SRC}

CmdLineOptParser.cc
CmdLineOptParser.h
JsonHelper.cc
JsonHelper.h
KMLDomDocument.cc
KMLDomDocument.h
KMLHelper.cc
KMLHelper.h
main.cc
QGC.cc
QGC.h
QGCApplication.cc
QGCApplication.h
QGCCachedFileDownload.cc
QGCCachedFileDownload.h
QGCConfig.h
QGCFileDownload.cc
QGCFileDownload.h
QGCLoggingCategory.cc
QGCLoggingCategory.h
QGCMapPalette.cc
QGCMapPalette.h
QGCPalette.cc
QGCPalette.h
QGCQGeoCoordinate.cc
QGCQGeoCoordinate.h
QGCTemporaryFile.cc
QGCTemporaryFile.h
QGCToolbox.cc
QGCToolbox.h
RunGuard.cc
RunGuard.h
ShapeFileHelper.cc
ShapeFileHelper.h
SHPFileHelper.cc
SHPFileHelper.h
TerrainTile.cc
TerrainTile.h
)

target_precompile_headers(${PROJECT_NAME} PRIVATE pch.h)
Expand Down Expand Up @@ -103,7 +61,7 @@ if (NOT ${QGC_AIRLINK_DISABLED})
add_subdirectory(AirLink)
endif()
add_subdirectory(Terrain)
add_subdirectory(uas)
add_subdirectory(Utilities)
add_subdirectory(UTMSP)
add_subdirectory(Vehicle)
add_subdirectory(VehicleSetup)
Expand All @@ -116,7 +74,6 @@ add_subdirectory(Viewer3D)
#######################################################
target_link_libraries(${PROJECT_NAME}
PRIVATE
shp
Qt6::QuickControls2
PUBLIC
Qt6::QuickWidgets
Expand Down Expand Up @@ -145,7 +102,7 @@ target_link_libraries(${PROJECT_NAME}
QGCLocation
Settings
Terrain
uas
Utilities
UTMSP
Vehicle
VehicleSetup
Expand All @@ -162,5 +119,4 @@ endif()
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/libs/shapelib
)
11 changes: 8 additions & 3 deletions src/MissionManager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ qt_add_library(MissionManager STATIC
GeoFenceController.h
GeoFenceManager.cc
GeoFenceManager.h
KMLDomDocument.cc
KMLDomDocument.h
KMLHelper.cc
KMLHelper.h
KMLPlanDomDocument.cc
KMLPlanDomDocument.h
LandingComplexItem.cc
Expand Down Expand Up @@ -83,8 +87,6 @@ qt_add_library(MissionManager STATIC
VisualMissionItem.h
VTOLLandingComplexItem.cc
VTOLLandingComplexItem.h

Section.h # shouldn't be listed here, but isn't named properly for AUTOMOC
)

add_custom_Target(MisionManagerQml
Expand All @@ -101,4 +103,7 @@ target_link_libraries(MissionManager
qgc
)

target_include_directories(MissionManager INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(MissionManager
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/PositionManager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

qt_add_library(PositionManager STATIC
PositionManager.cpp
PositionManager.h
SimulatedPosition.cc
SimulatedPosition.h
)

target_link_libraries(PositionManager
Expand Down
4 changes: 4 additions & 0 deletions src/QmlControls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ qt_add_library(QmlControls STATIC
HorizontalFactValueGrid.h
InstrumentValueData.cc
InstrumentValueData.h
QGCMapPalette.cc
QGCMapPalette.h
QGCPalette.cc
QGCPalette.h
ParameterEditorController.cc
ParameterEditorController.h
QGCFileDialogController.cc
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/Terrain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

qt_add_library(Terrain STATIC
TerrainQuery.cc
TerrainQuery.h
TerrainTile.cc
TerrainTile.h
)

target_link_libraries(Terrain
Expand Down
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions src/Utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
find_package(Qt6 REQUIRED COMPONENTS Core Positioning Qml)

qt_add_library(Utilities STATIC
JsonHelper.cc
JsonHelper.h
QGC.cc
QGC.h
QGCCachedFileDownload.cc
QGCCachedFileDownload.h
QGCFileDownload.cc
QGCFileDownload.h
QGCLoggingCategory.cc
QGCLoggingCategory.h
QGCQGeoCoordinate.cc
QGCQGeoCoordinate.h
QGCTemporaryFile.cc
QGCTemporaryFile.h
ShapeFileHelper.cc
ShapeFileHelper.h
SHPFileHelper.cc
SHPFileHelper.h
)

if(MOBILE)
target_sources(Utilities
PRIVATE
MobileScreenMgr.cc
MobileScreenMgr.h
)
endif()

target_link_libraries(Utilities
PRIVATE
Qt6::Qml
shp
PUBLIC
Qt6::Core
Qt6::Positioning
qgc
)

target_include_directories(Utilities
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/libs/shapelib
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/Vehicle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ qt_add_library(Vehicle STATIC
TerrainProtocolHandler.h
TrajectoryPoints.cc
TrajectoryPoints.h
UASMessageHandler.cc
UASMessageHandler.h
VehicleBatteryFactGroup.cc
VehicleBatteryFactGroup.h
Vehicle.cc
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/VideoReceiver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ target_link_libraries(VideoReceiver
Qt6::OpenGL
Qt6::Quick
${EXTRA_LIBRARIES}
Utilities
)

target_include_directories(VideoReceiver INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
13 changes: 0 additions & 13 deletions src/uas/CMakeLists.txt

This file was deleted.

0 comments on commit 58c3cb9

Please sign in to comment.