diff --git a/variables.cmake b/variables.cmake index cb3303a..a45a6b6 100644 --- a/variables.cmake +++ b/variables.cmake @@ -4,24 +4,26 @@ # For license and copyright information please follow this link: # https://github.com/desktop-app/legal/blob/master/LEGAL +set(no_special_target 0) +if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "") + set(no_special_target 1) +endif() + +set(linux_special_target 0) +if (LINUX AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "") + set(linux_special_target 1) +endif() + +set(osx_special_target 0) +if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx") + set(osx_special_target 1) +endif() + option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON) option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF) - -option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF) -if (LINUX AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "") - set(DESKTOP_APP_USE_GLIBC_WRAPS ON) -endif() - -option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ON) -if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "") - set(DESKTOP_APP_USE_PACKAGED OFF) -endif() - -option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF) -if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "osx") - set(DESKTOP_APP_DISABLE_SPELLCHECK ON) -endif() - +option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." ${linux_special_target}) +option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target}) +option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target}) option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${DESKTOP_APP_USE_PACKAGED}) option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED}) option(DESKTOP_APP_USE_PACKAGED_EXPECTED "Find expected using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED}) @@ -29,6 +31,8 @@ option(DESKTOP_APP_USE_PACKAGED_VARIANT "Find mapbox-variant using CMake instead option(DESKTOP_APP_USE_PACKAGED_GSL "Find GSL using CMake instead of bundled one." ${DESKTOP_APP_USE_PACKAGED}) option(DESKTOP_APP_USE_PACKAGED_QRCODE "Find qr-code-generator library using CMake instead of bundled one." OFF) option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled one." ${DESKTOP_APP_USE_PACKAGED}) +option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF) +option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF) option(DESKTOP_APP_ENABLE_IPO_OPTIMIZATIONS "Enable IPO build optimizations." OFF) if (DESKTOP_APP_ENABLE_IPO_OPTIMIZATIONS AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") @@ -36,14 +40,13 @@ if (DESKTOP_APP_ENABLE_IPO_OPTIMIZATIONS AND CMAKE_CXX_COMPILER_ID MATCHES "Clan set(DESKTOP_APP_ENABLE_IPO_OPTIMIZATIONS OFF) endif() -option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF) -option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF) - +set(disable_autoupdate 0) if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "" OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp" OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore") set(disable_autoupdate 1) endif() +option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate}) set(add_hunspell_library 0) if ((WIN32