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)