From: Kornel Benko Date: Wed, 4 Dec 2019 19:23:27 +0000 (+0100) Subject: Cmake build: Try to find hunspell.hxx for linunx _and_ for OSX X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ea4a95fc6982c7b80ba19de71c138f49350366cb;p=features.git Cmake build: Try to find hunspell.hxx for linunx _and_ for OSX --- diff --git a/development/cmake/modules/FindHunspell.cmake b/development/cmake/modules/FindHunspell.cmake index ae63f49f78..ad08ad6045 100644 --- a/development/cmake/modules/FindHunspell.cmake +++ b/development/cmake/modules/FindHunspell.cmake @@ -5,7 +5,13 @@ else() find_library(HUNSPELL_LIBRARY NAMES "hunspell" "hunspell-1.2" PATHS "/usr/local/lib" ${SYSTEM_LIB_DIRS} "/usr/lib64") endif() -FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell/hunspell.hxx") +FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell.hxx") +if (NOT HUNSPELL_INCLUDE_DIR) + FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell/hunspell.hxx") + if (HUNSPELL_INCLUDE_DIR) + set(HUNSPELL_INCLUDE_DIR "${HUNSPELL_INCLUDE_DIR}/hunspell") + endif() +endif() # handle the QUIETLY and REQUIRED arguments and # set HUNSPELL_FOUND to TRUE if all listed variables are TRUE