diff --git a/CMakeLists.txt b/CMakeLists.txt index 1102060..ab61117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ add_definitions( ) include(Git) -message(STATUS "QGroundControl version: ${GIT_VERSION}") +message(STATUS "QGroundControl version: ${APP_VERSION_STR}") #============================================================================= # ccache diff --git a/VideoReceiverApp/CMakeLists.txt b/VideoReceiverApp/CMakeLists.txt index 2630a49..c3c0f72 100644 --- a/VideoReceiverApp/CMakeLists.txt +++ b/VideoReceiverApp/CMakeLists.txt @@ -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 diff --git a/cmake/Git.cmake b/cmake/Git.cmake index 8dbebcd..c26b1da 100644 --- a/cmake/Git.cmake +++ b/cmake/Git.cmake @@ -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) diff --git a/cmake/QGCDeploy.cmake b/cmake/QGCDeploy.cmake index 1620966..3cc5b51 100644 --- a/cmake/QGCDeploy.cmake +++ b/cmake/QGCDeploy.cmake @@ -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 ) diff --git a/custom-example/custom.pri b/custom-example/custom.pri index cc233b2..b55dd86 100644 --- a/custom-example/custom.pri +++ b/custom-example/custom.pri @@ -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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 64ecfed..cb7301c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)