Merge pull request #362 from lnussel/qml

Add compile time options for telemetry and updates
This commit is contained in:
maxnet 2022-03-24 17:49:16 +01:00 committed by GitHub
commit d2a92383b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View file

@ -6,6 +6,9 @@ if (APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "" FORCE)
endif()
OPTION (ENABLE_CHECK_VERSION "Check for version updates" ON)
OPTION (ENABLE_TELEMETRY "Enable sending telemetry" ON)
project(rpi-imager LANGUAGES CXX C)
set(IMAGER_VERSION_MAJOR 1)
set(IMAGER_VERSION_MINOR 7)
@ -107,6 +110,18 @@ else()
message(STATUS "LTO not supported: <${ipoerror}>")
endif()
if(ENABLE_TELEMETRY)
add_definitions(-DTELEMETRY_ENABLED_DEFAULT=true)
else()
add_definitions(-DTELEMETRY_ENABLED_DEFAULT=false)
endif()
if(ENABLE_CHECK_VERSION)
add_definitions(-DCHECK_VERSION_DEFAULT=true)
else()
add_definitions(-DCHECK_VERSION_DEFAULT=false)
endif()
# Because dependencies are typically not available by default on Windows, build bundled code
if (WIN32)
# Target Windows 7 (needed for drivelist module)