From ba6f3d8d1ce3ce056312f8d5c78f7e8cc5f80aa9 Mon Sep 17 00:00:00 2001 From: Holden Date: Sun, 14 Apr 2024 14:01:40 -0400 Subject: [PATCH] Update Deployment --- .github/workflows/android.yml | 38 ++-- CMakeLists.txt | 233 ++++++++++---------- cmake/CompileOptions.cmake | 68 ------ cmake/Qt6QGCConfiguration.cmake | 3 +- src/CMakeLists.txt | 2 - src/QtLocationPlugin/QGCTileCacheWorker.cpp | 2 +- src/VideoReceiver/CMakeLists.txt | 4 + src/comm/CMakeLists.txt | 8 + 8 files changed, 156 insertions(+), 202 deletions(-) delete mode 100644 cmake/CompileOptions.cmake diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3fce1710b05b..b51f0b63d8a1 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -32,6 +32,7 @@ jobs: QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + QT_ANDROID_ABIS: "armeabi-v7a;arm64-v8a" steps: - name: Checkout repo @@ -40,6 +41,16 @@ jobs: submodules: recursive fetch-tags: true + - name: Set up Cache + uses: hendrikmuhs/ccache-action@v1.2 + if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' + with: + create-symlink: true + key: ${{ runner.os }}-Android-${{ matrix.BuildType }} + restore-keys: ${{ runner.os }}-Android-${{ matrix.BuildType }} + max-size: 1G + append-timestamp: false + - name: Setup Java Environment uses: actions/setup-java@v4 with: @@ -77,6 +88,7 @@ jobs: - name: Install Qt6 for Android (armv7) uses: ./install-qt-action/action/ + if: contains( env.QT_ANDROID_ABIS, 'armeabi-v7a') with: version: ${{ env.QT_VERSION }} host: linux @@ -89,6 +101,7 @@ jobs: - name: Install Qt6 for Android (arm64_v8a) uses: ./install-qt-action/action/ + if: contains( env.QT_ANDROID_ABIS, 'arm64-v8a') with: version: ${{ env.QT_VERSION }} host: linux @@ -101,6 +114,7 @@ jobs: - name: Install Qt6 for Android (x86) uses: ./install-qt-action/action/ + if: contains( env.QT_ANDROID_ABIS, 'x86') with: version: ${{ env.QT_VERSION }} host: linux @@ -113,6 +127,7 @@ jobs: - name: Install Qt6 for Android (x86_64) uses: ./install-qt-action/action/ + if: contains( env.QT_ANDROID_ABIS, 'x86_64') with: version: ${{ env.QT_VERSION }} host: linux @@ -128,37 +143,24 @@ jobs: env: GST_VERSION: 1.18.5 run: | - wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/${GST_VERSION}/gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz + wget https://gstreamer.freedesktop.org/data/pkg/android/${GST_VERSION}/gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz mkdir gstreamer-1.0-android-universal-${GST_VERSION} tar xf gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz -C gstreamer-1.0-android-universal-${GST_VERSION} - name: Install dependencies run: sudo apt-get install -y ninja-build - - name: Setup Environment - run: | - mkdir ${{ runner.temp }}/shadow_build_dir - echo "QT_HOST_PATH=${{ runner.temp }}/Qt/${{env.QT_VERSION}}/gcc_64" >> $GITHUB_ENV - echo "QT_TARGET_PATH=${{ runner.temp }}/Qt/${{env.QT_VERSION}}/android_arm64_v8a" >> $GITHUB_ENV + - run: mkdir ${{ runner.temp }}/shadow_build_dir - name: Configure working-directory: ${{ runner.temp }}/shadow_build_dir - run: cmake -S ${{ github.workspace }} -B . -G Ninja + run: ${{ env.QT_ROOT_DIR }}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.BuildType }} - -DCMAKE_SYSTEM_NAME=Android - -DCMAKE_FIND_ROOT_PATH:PATH=${{env.QT_TARGET_PATH}} - -DCMAKE_PREFIX_PATH:PATH=${{env.QT_TARGET_PATH}} - -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake - -DANDROID_SDK_ROOT=$ANDROID_SDK_ROOT - -DANDROID_NDK_ROOT=$ANDROID_NDK_ROOT - -DANDROID_ABI="arm64-v8a" - -DANDROID_PLATFORM=android-23 - -DQT_ANDROID_ABIS="armeabi-v7a;arm64-v8a" + -DQT_ANDROID_ABIS="${{ env.QT_ANDROID_ABIS }}" -DQT_ANDROID_BUILD_ALL_ABIS=OFF - -DQT_HOST_PATH:PATH=${{env.QT_HOST_PATH}} + -DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../gcc_64" -DQT_ANDROID_SIGN_APK=${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && 'ON' || 'OFF' }} -DQT_DEBUG_FIND_PACKAGE=ON - -DQT_ANDROID_MULTI_ABI_FORWARD_VARS=="QGC_STABLE_BUILD" -DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }} - name: Build diff --git a/CMakeLists.txt b/CMakeLists.txt index 73913ce68555..04cdbd70e09b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,68 +1,106 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) +set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) +endif() + +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM}) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM}) +endif() + ####################################################### # Project Info ####################################################### -project(QGroundControl LANGUAGES C CXX) +project(QGroundControl + VERSION 5.0 + DESCRIPTION "Open Source Ground Control App" + HOMEPAGE_URL "https://qgroundcontrol.com/" + LANGUAGES C CXX +) + +if(UNIX AND NOT APPLE AND NOT ANDROID) + set(LINUX TRUE) +endif() + +if(APPLE AND NOT IOS) + set(MACOS TRUE) +endif() + +if(IOS OR ANDROID) + set(MOBILE TRUE) + add_compile_definitions(__mobile__) +endif() ####################################################### # CMake Configuration Options ####################################################### +include(FeatureSummary) +include(FetchContent) +include(ExternalProject) +include(GNUInstallDirs) +include(CMakeDependentOption) +include(CMakePrintHelpers) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/staging) +if(LINUX) + set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/AppDir/usr) +else() + set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/staging) +endif() set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR OFF) - -include(FeatureSummary) -include(CMakePrintHelpers) -include(FetchContent) -include(ExternalProject) -include(GNUInstallDirs) - -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release") -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) -endif() -cmake_print_variables(CMAKE_BUILD_TYPE) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) -option(QGC_STABLE_BUILD "Stable build option" OFF) -cmake_print_variables(QGC_STABLE_BUILD) -if(NOT QGC_STABLE_BUILD) - add_compile_definitions(DAILY_BUILD) -endif() - -include(CMakeDependentOption) -cmake_dependent_option(QGC_BUILD_TESTING "Enable testing" ON "CMAKE_BUILD_TYPE STREQUAL Debug" OFF) - -include(CompileOptions) - -find_program(CCACHE_PROGRAM ccache) -if(CCACHE_PROGRAM) - set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") -endif() +cmake_print_variables(CMAKE_VERSION) +cmake_print_variables(CMAKE_PREFIX_PATH) +cmake_print_variables(CMAKE_HOST_SYSTEM_NAME) +cmake_print_variables(CMAKE_HOST_SYSTEM_VERSION) +cmake_print_variables(CMAKE_SYSTEM_NAME) +cmake_print_variables(CMAKE_SYSTEM_VERSION) +cmake_print_variables(CMAKE_CURRENT_SOURCE_DIR) +cmake_print_variables(CMAKE_BUILD_TYPE) +cmake_print_variables(CMAKE_TOOLCHAIN_FILE) ####################################################### # Qt6 Configuration ####################################################### include(Qt6QGCConfiguration) -cmake_print_variables(QT_VERSION QT_MKSPEC) -if(LINUX) - set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/AppDir/usr) -elseif(ANDROID) +set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml" CACHE PATH "Install path for QML" FORCE) +# set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE STRING "Extra QML Import Paths" FORCE) +add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x060600) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + add_compile_definitions( + NDEBUG + QT_NO_DEBUG + QT_NO_DEBUG_OUTPUT + ) +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + include(CTest) + enable_testing() +endif() + +if(ANDROID) cmake_print_variables(QT_ANDROID_APPLICATION_ARGUMENTS QT_HOST_PATH) set(QT_ENABLE_VERBOSE_DEPLOYMENT ON CACHE BOOL "Verbose Deployment") + # QT_USE_TARGET_ANDROID_BUILD_DIR + list(APPEND QT_ANDROID_MULTI_ABI_FORWARD_VARS QGC_STABLE_BUILD) + list(APPEND QT_ANDROID_MULTI_ABI_FORWARD_VARS QT_HOST_PATH) + cmake_print_variables(QT_ANDROID_MULTI_ABI_FORWARD_VARS) + # QT_ANDROID_DEPLOY_RELEASE # set(QT_ANDROID_DEPLOYMENT_TYPE ON CACHE BOOL "Deployment Type") cmake_dependent_option(QT_ANDROID_SIGN_APK "Enable Signing APK" ON "CMAKE_BUILD_TYPE STREQUAL Release" OFF) if(QT_ANDROID_SIGN_APK) @@ -113,54 +151,29 @@ qt_policy( SET QTP0002 NEW ) -set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml" CACHE PATH "Install path for QML" FORCE) -set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE STRING "Extra QML Import Paths" FORCE) - ####################################################### -# QML Configuration +# QGroundControl Options ####################################################### -option(QGC_COMPILE_QML "Pre-compile QML files using the Qt Quick compiler." FALSE) -add_feature_info(COMPILE_QML COMPILE_QML "Pre-compile QML files using the Qt Quick compiler.") -if(QGC_COMPILE_QML) - find_package(Qt6QuickCompiler) - set_package_properties(Qt6QuickCompiler - PROPERTIES - DESCRIPTION "Pre-compile QML files using the Qt Quick compiler." - TYPE OPTIONAL - ) +option(QGC_STABLE_BUILD "Stable build option" OFF) +if(NOT QGC_STABLE_BUILD) + add_compile_definitions(DAILY_BUILD) endif() -option(QGC_DEBUG_QML "Build QGroundControl with QML debugging/profiling support." FALSE) -add_feature_info(DEBUG_QML DEBUG_QML "Build QGroundControl with QML debugging/profiling support.") -if(QGC_DEBUG_QML) - message(STATUS "To enable the QML debugger/profiler, run with: '-qmljsdebugger=port:1234'") - add_compile_definitions( - QMLJSDEBUGGER - QT_QML_DEBUG - ) +cmake_dependent_option(QGC_BUILD_TESTING "Enable testing" ON "CMAKE_BUILD_TYPE STREQUAL Debug" OFF) +if(QGC_BUILD_TESTING) + add_compile_definitions(UNITTEST_BUILD) # TODO: QGC_UNITTEST_BUILD endif() -####################################################### -# QGroundControl Info -####################################################### +# option(QGC_CUSTOM_BUILD "Enable Custom Build" OFF) -set(COMPANY "Mavlink") -set(COPYRIGHT "Copyright (c) 2018 QGroundControl. All rights reserved.") -set(IDENTIFIER "io.mavlink.qgroundcontrol") +# option(QGC_DISABLE_MAVLINK_INSPECTOR "Disable Mavlink Inspector" OFF) # This removes QtCharts which is GPL licensed -add_compile_definitions( - QGC_APPLICATION_NAME="QGroundControl" - QGC_ORG_NAME="QGroundControl.org" - QGC_ORG_DOMAIN="org.qgroundcontrol" -) - -####################################################### -# QGroundControl Git Information -####################################################### - -include(Git) -cmake_print_variables(APP_VERSION_STR) +cmake_dependent_option(QGC_DEBUG_QML "Build QGroundControl with QML debugging/profiling support." OFF "CMAKE_BUILD_TYPE STREQUAL Debug" OFF) +if(QGC_DEBUG_QML) + message(STATUS "To enable the QML debugger/profiler, run with: '-qmljsdebugger=port:1234'") + add_compile_definitions(QT_QML_DEBUG) +endif() ####################################################### # QGroundControl Resources @@ -198,40 +211,40 @@ endif() # QGroundControl Target ####################################################### -qt_add_executable(${PROJECT_NAME} src/main.cc ${QGC_RESOURCES}) - -add_subdirectory(libs) -add_subdirectory(src) - -set_target_properties(${PROJECT_NAME} - PROPERTIES - QT_RESOURCE_PREFIX "/qgc" +qt_add_executable(${PROJECT_NAME} + src/main.cc + ${QGC_RESOURCES} ) -target_precompile_headers(${PROJECT_NAME} PRIVATE src/pch.h) - if(Qt6LinguistTools_FOUND) file(GLOB TS_SOURCES RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/translations/qgc_*.ts) - # TODO: Update to new qt_add_translations form in Qt6.7 - qt_add_translations(${PROJECT_NAME} - TS_FILES - ${TS_SOURCES} - ) + qt_add_translations(${PROJECT_NAME} TS_FILES ${TS_SOURCES}) # TODO: Update to new qt_add_translations form in Qt6.7 endif() -if(MACOS) +target_precompile_headers(${PROJECT_NAME} PRIVATE src/pch.h) + +set_target_properties(${PROJECT_NAME} PROPERTIES QT_RESOURCE_PREFIX "/qgc") + +if(WIN32) + set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE) + add_compile_definitions(_USE_MATH_DEFINES) +elseif(MACOS) set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/deploy/mac/MacOSXBundleInfo.plist.in + MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME} + MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} + MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2018 QGroundControl. All rights reserved." + MACOSX_BUNDLE_GUI_IDENTIFIER "io.mavlink.qgroundcontrol" + MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/resources/icons/macx.icns" + # MACOSX_BUNDLE_INFO_STRING + # MACOSX_BUNDLE_LONG_VERSION_STRING + # MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} ) elseif(IOS) - set_target_properties(${PROJECT_NAME} - PROPERTIES - QT_IOS_LAUNCH_SCREEN ${CMAKE_SOURCE_DIR}/deploy/ios/QGCLaunchScreen.xib - ) -elseif(WIN32) - set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE) + enable_language(OBJC) + set_target_properties(${PROJECT_NAME} PROPERTIES QT_IOS_LAUNCH_SCREEN ${CMAKE_SOURCE_DIR}/deploy/ios/QGCLaunchScreen.xib) elseif(ANDROID) FetchContent_Declare(android_openssl DOWNLOAD_EXTRACT_TIMESTAMP true @@ -241,15 +254,6 @@ elseif(ANDROID) include(${android_openssl_SOURCE_DIR}/android_openssl.cmake) add_android_openssl_libraries(${PROJECT_NAME}) - cmake_print_variables( - QT_ANDROID_ABIS - QT_ANDROID_BUILD_ALL_ABIS - QT_PATH_ANDROID_ABI_armeabi-v7a - QT_PATH_ANDROID_ABI_arm64-v8a - QT_PATH_ANDROID_ABI_x86 - QT_PATH_ANDROID_ABI_x86_64 - ) - set_target_properties(${PROJECT_NAME} PROPERTIES # QT_ANDROID_ABIS ${ANDROID_ABI} @@ -257,20 +261,25 @@ elseif(ANDROID) QT_ANDROID_TARGET_SDK_VERSION 34 QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/android QT_ANDROID_VERSION_NAME "${CMAKE_PROJECT_VERSION}" - # QT_ANDROID_VERSION_CODE "${CMAKE_PROJECT_VERSION}" + # QT_ANDROID_VERSION_CODE "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" QT_QML_ROOT_PATH ${CMAKE_SOURCE_DIR} ) - # get_target_property(QGC_ANDROID_DEPLOY_FILE ${PROJECT_NAME} QT_ANDROID_DEPLOYMENT_SETTINGS_FILE) - # cmake_print_variables(QGC_ANDROID_DEPLOY_FILE) -endif() +elseif(LINUX) -target_link_libraries(${PROJECT_NAME} PRIVATE qgc) +endif() -####################################################### -# Testing Configuration -####################################################### +include(Git) +add_compile_definitions( + QGC_APPLICATION_NAME="QGroundControl" + QGC_ORG_NAME="QGroundControl.org" + QGC_ORG_DOMAIN="org.qgroundcontrol" + APP_VERSION_STR="${APP_VERSION_STR}" +) +add_subdirectory(libs) +add_subdirectory(src) +target_link_libraries(${PROJECT_NAME} PRIVATE qgc) if(QGC_BUILD_TESTING) add_subdirectory(test) target_link_libraries(${PROJECT_NAME} PRIVATE qgctest) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake deleted file mode 100644 index 72f5aca37814..000000000000 --- a/cmake/CompileOptions.cmake +++ /dev/null @@ -1,68 +0,0 @@ -if(UNIX AND NOT APPLE AND NOT ANDROID) - set(LINUX TRUE) -endif() - -if(APPLE AND NOT IOS) - set(MACOS TRUE) -endif() - -if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - include(CTest) - enable_testing() - if(QGC_BUILD_TESTING) - message("Building tests") - add_compile_definitions(UNITTEST_BUILD) # TODO: QGC_UNITTEST_BUILD - else() - # will prevent the definition of QT_DEBUG, which enables code that uses MockLink - add_compile_definitions(QT_NO_DEBUG) - endif() -elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release") - add_compile_definitions(QGC_INSTALL_RELEASE) -endif() - -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # clang and AppleClang - add_compile_options( - -Wall - -Wextra - -Wno-address-of-packed-member # ignore for mavlink - ) -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # GCC - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9) - add_compile_options(-fdiagnostics-color=always) - endif() - - add_compile_options( - -Wall - -Wextra - ) -elseif(WIN32) - add_compile_definitions(_USE_MATH_DEFINES) - add_compile_options( - /wd4244 # warning C4244: '=': conversion from 'double' to 'float', possible loss of data - ) -endif() - -add_compile_definitions( - QT_DISABLE_DEPRECATED_BEFORE=0x060600 - QT_DEBUG_FIND_PACKAGE=ON -) - -if(ANDROID OR IOS) - set(MOBILE TRUE) - add_compile_definitions(__mobile__) -endif() - -if(ANDROID) - add_compile_definitions(__android__) -elseif(IOS) - add_compile_definitions(__ios__) -endif() - -if(NOT EXISTS ${CMAKE_SOURCE_DIR}/libs/mavlink/include/mavlink/v2.0/ardupilotmega) - add_compile_definitions(NO_ARDUPILOT_DIALECT) # TODO: Make this QGC_NO_ARDUPILOT_DIALECT -endif() - -# option(QGC_CUSTOM_BUILD "Enable Custom Build" OFF) -# option(QGC_DISABLE_MAVLINK_INSPECTOR "Disable Mavlink Inspector" OFF) # This removes QtCharts which is GPL licensed diff --git a/cmake/Qt6QGCConfiguration.cmake b/cmake/Qt6QGCConfiguration.cmake index d241e57139a1..54af5a76d079 100644 --- a/cmake/Qt6QGCConfiguration.cmake +++ b/cmake/Qt6QGCConfiguration.cmake @@ -52,4 +52,5 @@ elseif(LINUX) list(APPEND QT_LIBRARY_HINTS $ENV{HOME}/Qt/${QT_VERSION}/${QT_MKSPEC}) endif() -message(STATUS "lib hints ${QT_LIBRARY_HINTS}") \ No newline at end of file +include(CMakePrintHelpers) +cmake_print_variables(QT_VERSION QT_MKSPEC QT_LIBRARY_HINTS) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb81f5d0dfed..ba68f936b3a4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,8 +8,6 @@ qt_add_library(qgc STATIC QGCToolbox.h ) -set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS APP_VERSION_STR="${APP_VERSION_STR}") - add_subdirectory(ADSB) add_subdirectory(AirLink) add_subdirectory(AnalyzeView) diff --git a/src/QtLocationPlugin/QGCTileCacheWorker.cpp b/src/QtLocationPlugin/QGCTileCacheWorker.cpp index 8f5518d50dc1..e21caff5a3dd 100644 --- a/src/QtLocationPlugin/QGCTileCacheWorker.cpp +++ b/src/QtLocationPlugin/QGCTileCacheWorker.cpp @@ -1200,7 +1200,7 @@ QGCCacheWorker::_lookupReady(QHostInfo info) socket->deleteLater(); }); } else { - qDebug(QGCTileCacheLog) << "No Internet Access"; + qCDebug(QGCTileCacheLog) << "No Internet Access"; emit internetStatus(false); } #endif diff --git a/src/VideoReceiver/CMakeLists.txt b/src/VideoReceiver/CMakeLists.txt index 5350c4e83450..ee8c91096737 100644 --- a/src/VideoReceiver/CMakeLists.txt +++ b/src/VideoReceiver/CMakeLists.txt @@ -30,4 +30,8 @@ if(GST_FOUND) qmlglsink Settings ) + + if(CMAKE_BUILD_TYPE STREQUAL "Release") + target_compile_definitions(VideoReceiver PRIVATE QGC_INSTALL_RELEASE) + endif() endif() diff --git a/src/comm/CMakeLists.txt b/src/comm/CMakeLists.txt index 88b992a8343b..a6452ee3f1b7 100644 --- a/src/comm/CMakeLists.txt +++ b/src/comm/CMakeLists.txt @@ -77,6 +77,14 @@ endif() target_compile_definitions(comm PUBLIC QGC_ENABLE_BLUETOOTH) +if(NOT EXISTS ${CMAKE_SOURCE_DIR}/libs/mavlink/include/mavlink/v2.0/ardupilotmega) + target_compile_definitions(${PROJECT_NAME} PUBLIC NO_ARDUPILOT_DIALECT) # TODO: Make this QGC_NO_ARDUPILOT_DIALECT +endif() + +# if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +# target_compile_options(comm PRIVATE -Wno-address-of-packed-member) +# endif() + target_include_directories(comm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}