Implement compile-time flag to disable automatic update checks. (#4854)

Usage: `cmake -DCHATTERINO_UPDATER=OFF ..`

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
This commit is contained in:
Patrick Klein
2023-10-02 10:43:20 +01:00
committed by GitHub
parent bc218b4261
commit 5b17ae3f7e
4 changed files with 17 additions and 6 deletions
+5
View File
@@ -1039,3 +1039,8 @@ if(CHATTERINO_ENABLE_LTO)
set_property(TARGET ${LIBRARY_PROJECT}
PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
if(NOT CHATTERINO_UPDATER)
message(STATUS "Disabling the updater.")
target_compile_definitions(${LIBRARY_PROJECT} PUBLIC CHATTERINO_DISABLE_UPDATER)
endif()