1
0
Fork 0

Use bundled fonts and rlottie by default since they're patched

This commit is contained in:
Ilya Fedin 2022-01-13 00:06:00 +04:00 committed by John Preston
parent 0e6f53ced4
commit e97ab1bcb5
3 changed files with 15 additions and 22 deletions

View file

@ -7,27 +7,17 @@
add_library(external_rlottie INTERFACE IMPORTED GLOBAL) add_library(external_rlottie INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_rlottie ALIAS external_rlottie) add_library(desktop-app::external_rlottie ALIAS external_rlottie)
if (DESKTOP_APP_USE_PACKAGED) if (DESKTOP_APP_USE_PACKAGED_RLOTTIE)
find_package(rlottie QUIET) find_package(rlottie QUIET)
if (rlottie_FOUND) if (rlottie_FOUND)
target_link_libraries(external_rlottie INTERFACE rlottie::rlottie) target_link_libraries(external_rlottie INTERFACE rlottie::rlottie)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(RLOTTIE IMPORTED_TARGET rlottie)
if (RLOTTIE_FOUND)
target_link_libraries(external_rlottie INTERFACE PkgConfig::RLOTTIE)
endif()
endif()
if (rlottie_FOUND OR RLOTTIE_FOUND)
target_compile_definitions(external_rlottie
INTERFACE
DESKTOP_APP_USE_PACKAGED_RLOTTIE
)
return() return()
endif() endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(RLOTTIE REQUIRED IMPORTED_TARGET rlottie)
target_link_libraries(external_rlottie INTERFACE PkgConfig::RLOTTIE)
return()
endif() endif()
add_library(external_rlottie_bundled STATIC) add_library(external_rlottie_bundled STATIC)

View file

@ -64,6 +64,13 @@ if (DESKTOP_APP_USE_PACKAGED_FONTS)
) )
endif() endif()
if (DESKTOP_APP_USE_PACKAGED_RLOTTIE)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_USE_PACKAGED_RLOTTIE
)
endif()
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "") if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
target_compile_definitions(common_options target_compile_definitions(common_options
INTERFACE INTERFACE

View file

@ -23,6 +23,8 @@ option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF) option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer (Linux only)." OFF) option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer (Linux only)." OFF)
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF) option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" 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_SPELLCHECK "Disable spellcheck library." OFF) option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF)
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target}) 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_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
@ -36,12 +38,6 @@ else()
set(DESKTOP_APP_MAC_ARCH "x86_64;arm64" CACHE STRING "Target macOS arch. (macOS only)") set(DESKTOP_APP_MAC_ARCH "x86_64;arm64" CACHE STRING "Target macOS arch. (macOS only)")
endif() endif()
set(dont_bundle_fonts 0)
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
set(dont_bundle_fonts 1)
endif()
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled one." ${dont_bundle_fonts})
set(add_hunspell_library 0) set(add_hunspell_library 0)
if ((WIN32 if ((WIN32
OR (LINUX AND NOT DESKTOP_APP_USE_ENCHANT) OR (LINUX AND NOT DESKTOP_APP_USE_ENCHANT)