diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 6c873f0a7b..e53b4d33a3 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -194,7 +194,10 @@ if(use_external_libintl) add_definitions(-DHAVE_GETTEXT) endif() -find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx") +find_library(HUNSPELL_LIBRARY "hunspell") +if (HUNSPELL_LIBRARY) + find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx") +endif() if (HUNSPELL_FOUND) message(STATUS "----- Building with Hunspell") diff --git a/development/cmake/src/CMakeLists.txt b/development/cmake/src/CMakeLists.txt index b7bcd1082d..89786426da 100644 --- a/development/cmake/src/CMakeLists.txt +++ b/development/cmake/src/CMakeLists.txt @@ -81,6 +81,9 @@ target_link_libraries(${_lyx} ${QT_QTMAIN_LIBRARY} ${vld_dll}) +if (HUNSPELL_FOUND) + target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY}) +endif() if (ASPELL_FOUND) target_link_libraries(${_lyx} ${ASPELL_LIBRARY}) endif()