Add compile time options for telemetry and updates

This commit is contained in:
Ludwig Nussel 2022-02-14 15:01:32 +01:00
parent 0a07169a8a
commit 5d971375f6
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)