Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.2: Fix build with latest compiler using cmake #10538

Merged
merged 4 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ add_definitions(
)

include(Git)
message(STATUS "QGroundControl version: ${GIT_VERSION}")
message(STATUS "QGroundControl version: ${APP_VERSION_STR}")

#=============================================================================
# ccache
Expand Down
3 changes: 2 additions & 1 deletion QGCCommon.pri
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ linux {
DEFINES += QGC_GST_MICROHARD_ENABLED
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CXXFLAGS_WARN_ON += -Werror \
-Wno-unused-parameter # gst-plugins-good
-Wno-unused-parameter \ # gst-plugins-good
-Wno-deprecated-declarations # eigen
} else {
error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
}
Expand Down
2 changes: 1 addition & 1 deletion VideoReceiverApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ set(COPYRIGHT "Copyright (c) 2020 VideoReceiverApp. All rights reserved.")
set(IDENTIFIER "labs.auterion.VideoReceiverApp")

include(Git)
message(STATUS "VideoReceiverApp version: ${GIT_VERSION}")
message(STATUS "VideoReceiverApp version: ${APP_VERSION_STR}")

#=============================================================================
# ccache
Expand Down
2 changes: 1 addition & 1 deletion cmake/Git.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ endif()
# Fetch the necessary git variables
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --tags
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_VERSION
OUTPUT_VARIABLE APP_VERSION_STR
OUTPUT_STRIP_TRAILING_WHITESPACE)
2 changes: 1 addition & 1 deletion cmake/QGCDeploy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ elseif(APPLE)
COMMAND
rsync -a --delete ${CMAKE_BINARY_DIR}/QGroundControl.app ${CMAKE_BINARY_DIR}/staging
COMMAND
hdiutil create /tmp/tmp.dmg -ov -volname "QGroundControl-$${GIT_VERSION}" -fs HFS+ -srcfolder "staging"
hdiutil create /tmp/tmp.dmg -ov -volname "QGroundControl-$${APP_VERSION_STR}" -fs HFS+ -srcfolder "staging"
COMMAND
hdiutil convert /tmp/tmp.dmg -format UDBZ -o ${CMAKE_BINARY_DIR}/package/QGroundControl.dmg
)
Expand Down
4 changes: 2 additions & 2 deletions custom-example/custom.pri
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ win32 {
}
CUSTOM_QGC_VERSION = $${CUSTOM_QGC_VER_MAJOR}.$${CUSTOM_QGC_VER_MINOR}.$${CUSTOM_QGC_VER_BUILD}

DEFINES -= GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
DEFINES += GIT_VERSION=\"\\\"$$CUSTOM_QGC_VERSION\\\"\"
DEFINES -= APP_VERSION_STR=\"\\\"$$APP_VERSION_STR\\\"\"
DEFINES += APP_VERSION_STR=\"\\\"$$CUSTOM_QGC_VERSION\\\"\"

message(Custom QGC Version: $${CUSTOM_QGC_VERSION})

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ add_library(qgc
TerrainTile.h
)

set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION="${GIT_VERSION}")
set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS APP_VERSION_STR="${APP_VERSION_STR}")

add_subdirectory(ui)

Expand Down
3 changes: 3 additions & 0 deletions src/Vehicle/Actuators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ add_library(Actuators
MotorAssignment.h
)

target_link_libraries(Actuators PRIVATE
qgc)