1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-01 22:25:26 +02:00

cmake: fix hunspell

Consider system hunspell.

Change-Id: I8f78e8c12a7c16937cab83091113b3e474d9f44e
This commit is contained in:
Fadi Shehadeh 2025-05-12 12:49:52 -04:00
parent 0333016c44
commit 4ee1a309a1

View file

@ -474,7 +474,7 @@ endif()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
# hunspell # hunspell
pkg_check_modules(HUNSPELL hunspell) pkg_search_module(hunspell IMPORTED_TARGET hunspell)
if(MSVC) if(MSVC)
elseif (NOT APPLE) elseif (NOT APPLE)
set(HUNSPELL_DICT_DIR "/usr/share/hunspell/") set(HUNSPELL_DICT_DIR "/usr/share/hunspell/")
@ -482,25 +482,9 @@ else()
set(HUNSPELL_DICT_DIR "/Library/Spelling/") set(HUNSPELL_DICT_DIR "/Library/Spelling/")
endif() endif()
if(HUNSPELL_FOUND) if(hunspell_FOUND)
message(STATUS "hunspell found") message(STATUS "hunspell found")
include_directories(${HUNSPELL_INCLUDE_DIR}) set(HUNSPELL_LIBRARIES PkgConfig::hunspell)
find_path(HUNSPELL_INCLUDE_DIRS
NAMES hunspell.hxx
PATH_SUFFIXES hunspell
HINTS ${HUNSPELL_INCLUDE_DIRS}
)
find_library(HUNSPELL_LIBRARIES
NAMES ${HUNSPELL_LIBRARIES}
hunspell
hunspell-1.7
libhunspell
libhunspell-1.7
libhunspell-devel
libhunspell-dev
HINTS ${HUNSPELL_LIBRARY_DIRS}
)
else() else()
message(STATUS "hunspell not found - building hunspell") message(STATUS "hunspell not found - building hunspell")
@ -752,7 +736,7 @@ qt_add_executable(
${QML_RESOURCES_QML} ${QML_RESOURCES_QML}
${SFPM_OBJECTS}) ${SFPM_OBJECTS})
add_dependencies(${PROJECT_NAME} hunspell) #add_dependencies(${PROJECT_NAME} hunspell)
# Ensure the generated version file can be found. # Ensure the generated version file can be found.
add_dependencies(${PROJECT_NAME} generate_version_info) add_dependencies(${PROJECT_NAME} generate_version_info)