From 6dd044ae163bc67a7f0f0dbf6a2fa28b633b5fdf Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 24 Feb 2020 18:47:54 +0300 Subject: [PATCH] Removed adding Hunspell subdirectory if it is not used. --- external/CMakeLists.txt | 4 +++- variables.cmake | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index be7dbada..9c69674e 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -12,7 +12,9 @@ endif() add_subdirectory(expected) add_subdirectory(ffmpeg) add_subdirectory(gsl) -add_subdirectory(hunspell) +if (add_hunspell_library) + add_subdirectory(hunspell) +endif() add_subdirectory(iconv) add_subdirectory(lz4) add_subdirectory(openal) diff --git a/variables.cmake b/variables.cmake index 2926fb15..3c712162 100644 --- a/variables.cmake +++ b/variables.cmake @@ -45,6 +45,14 @@ if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "" set(disable_autoupdate 1) endif() +set(add_hunspell_library 0) +if ((WIN32 + OR (LINUX AND NOT DESKTOP_APP_USE_ENCHANT) + OR DESKTOP_APP_USE_HUNSPELL_ONLY) + AND NOT DESKTOP_APP_DISABLE_SPELLCHECK) + set(add_hunspell_library 1) +endif() + set(build_osx 0) set(build_macstore 0) set(build_winstore 0)