Files
tdesktop/cmake/variables.cmake
allhaileris afb81b8278
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
init
2026-02-16 15:50:16 +03:00

102 lines
3.9 KiB
CMake

# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
include(CMakeDependentOption)
set(no_special_target 0)
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
set(no_special_target 1)
endif()
set(disable_autoupdate 0)
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64"
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwparm"
OR DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
set(disable_autoupdate 1)
endif()
set(CMAKE_CXX_SCAN_FOR_MODULES OFF CACHE BOOL "")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
option(DESKTOP_APP_TEST_APPS "Build test apps, development only." OFF)
option(DESKTOP_APP_LOTTIE_DISABLE_RECOLORING "Disable recoloring of lottie animations." OFF)
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
cmake_dependent_option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration." OFF LINUX ON)
cmake_dependent_option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer." OFF LINUX OFF)
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled patched ones." OFF)
option(DESKTOP_APP_USE_PACKAGED_RLOTTIE "Find rlottie using CMake instead of bundled patched one." OFF)
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
option(DESKTOP_APP_DISABLE_QT_PLUGINS "Disable bundled Qt plugins." OFF)
option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
option(DESKTOP_APP_ASAN "Enable address sanitizer" OFF)
cmake_dependent_option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell." OFF LINUX OFF)
cmake_dependent_option(DESKTOP_APP_USE_CLD3 "Disable system text language recognition and use bundled cld3 only." OFF APPLE ON)
if (APPLE)
set(DESKTOP_APP_MAC_ARCH "" CACHE STRING "Target macOS arch.")
else()
set(DESKTOP_APP_MAC_ARCH)
endif()
set(add_hunspell_library 0)
if (WIN32
OR (LINUX AND NOT DESKTOP_APP_USE_ENCHANT)
OR DESKTOP_APP_USE_HUNSPELL_ONLY)
set(add_hunspell_library 1)
endif()
set(add_cld3_library 0)
if (LINUX OR DESKTOP_APP_USE_CLD3)
set(add_cld3_library 1)
endif()
set(build_macstore 0)
set(build_winstore 0) # x86 or x64 or arm
set(build_win64 0) # normal or uwp
set(build_winarm 0) # normal or uwp
if (WIN32)
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "win64")
set(build_win64 1)
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "winarm")
set(build_winarm 1)
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp")
set(build_winstore 1)
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64")
set(build_win64 1)
set(build_winstore 1)
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwparm")
set(build_winarm 1)
set(build_winstore 1)
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "ARM")
set(build_winarm 1)
else()
set(build_win64 1)
endif()
endif()
elseif (APPLE)
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
set(build_macstore 1)
endif()
endif()
#if (DESKTOP_APP_ASAN AND WIN32)
# if (build_win64)
# get_filename_component(libs_loc "../Libraries/asan-win64" REALPATH)
# else()
# get_filename_component(libs_loc "../Libraries/asan" REALPATH)
# endif()
#elseif (build_win64)
if (build_win64)
get_filename_component(libs_loc "../Libraries/win64" REALPATH)
else()
get_filename_component(libs_loc "../Libraries" REALPATH)
endif()