Skip to content

Commit

Permalink
CMake: Custom Build Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Aug 23, 2024
1 parent e9b615f commit 5e82cdb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
14 changes: 7 additions & 7 deletions cmake/CustomOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# The following options can be overriden by custom builds using the CustomOverrides.cmake file
set(QGC_APP_NAME "QGroundControl")
set(QGC_APP_COPYRIGHT "Copyright (c) 2024 QGroundControl. All rights reserved.")
set(QGC_APP_DESCRIPTION "Open Source Ground Control App")
set(QGC_ORG_NAME "QGroundControl.org")
set(QGC_ORG_DOMAIN "org.qgroundcontrol")
set(QGC_APP_NAME "QGroundControl" CACHE STRING "App Name")
set(QGC_APP_COPYRIGHT "Copyright (c) 2024 QGroundControl. All rights reserved." CACHE STRING "Copyright")
set(QGC_APP_DESCRIPTION "Open Source Ground Control App" CACHE STRING "Description")
set(QGC_ORG_NAME "QGroundControl.org" CACHE STRING "Org Name")
set(QGC_ORG_DOMAIN "org.qgroundcontrol" CACHE STRING "Domain")

# MacOS
set(QGC_BUNDLE_ID "org.qgroundcontrol.QGroundControl")
set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/resources/icons")
set(QGC_BUNDLE_ID "org.qgroundcontrol.QGroundControl" CACHE STRING "MacOS Bundle ID")
set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/resources/icons" CACHE PATH "MacOS Icon Path")

# APM
option(QGC_DISABLE_APM_MAVLINK "Disable APM Dialect" OFF)
Expand Down
8 changes: 4 additions & 4 deletions custom-example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ set_property(DIRECTORY ${CMAKE_SOURCE_DIR}
CUSTOMCLASS=CustomPlugin
)

find_package(Python)
if(PYTHON_FOUND)
find_package(Python3)
if(Python3_FOUND)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
RESULT_VARIABLE PYTHON_RESULT
OUTPUT_VARIABLE PYTHON_OUTPUT
ERROR_VARIABLE PYTHON_ERROR
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
INPUT_FILE updateqrc.py
OUTPUT_STRIP_TRAILING_WHITESPACE
)
cmake_print_variables(RESULT_VARIABLE OUTPUT_VARIABLE ERROR_VARIABLE)
cmake_print_variables(PYTHON_RESULT PYTHON_OUTPUT PYTHON_ERROR)
endif()

# Our own, custom resources
Expand Down
4 changes: 2 additions & 2 deletions custom-example/cmake/CustomOverrides.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(QGC_APP_NAME "Custom-QGroundControl")
set(QGC_APP_NAME "Custom-QGroundControl" CACHE STRING "App Name" FORCE)

set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/custom/res")
set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/custom/res" CACHE PATH "MacOS Icon Path" FORCE)

# Build a single flight stack by disabling APM support
set(QGC_DISABLE_APM_MAVLINK ON CACHE BOOL "Disable APM Dialect" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/APM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ qt_add_library(APMAutoPilotPlugin STATIC
target_link_libraries(APMAutoPilotPlugin
PRIVATE
APMFirmwarePlugin
AutoPilotPlugins
FactSystem
QGC
Settings
Expand All @@ -56,6 +55,7 @@ target_link_libraries(APMAutoPilotPlugin
PUBLIC
Qt6::Core
Qt6::Quick
AutoPilotPlugins
CommonAutoPilotPlugin
FactControls
MAVLink
Expand Down
4 changes: 3 additions & 1 deletion src/FirmwarePlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if(NOT QGC_DISABLE_APM_PLUGIN)
add_subdirectory(APM)
endif()
add_subdirectory(PX4)
if(NOT QGC_DISABLE_PX4_PLUGIN)
add_subdirectory(PX4)
endif()

find_package(Qt6 REQUIRED COMPONENTS Core Positioning)

Expand Down

0 comments on commit 5e82cdb

Please sign in to comment.