lyx_mirror/development/cmake/modules/FindHunspell.cmake
Kornel Benko cf45962d76 Backport r38830, debian multiarch handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38833 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-24 19:18:12 +00:00

21 lines
668 B
CMake

if(WIN32)
find_library(HUNSPELL_LIBRARY "libhunspell")
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")
# handle the QUIETLY and REQUIRED arguments and
# set HUNSPELL_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)
if(HUNSPELL_FIND_REQUIRED AND NOT HUNSPELL_FOUND)
message(FATAL_ERROR "Could not find Hunspell library")
endif()
mark_as_advanced(HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)