--- libs/vtextedit/src/CMakeLists.txt.orig	2024-07-07 14:06:11 UTC
+++ libs/vtextedit/src/CMakeLists.txt
@@ -6,6 +6,8 @@ find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_CO
 set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6")
 find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core Gui Network Svg Widgets LinguistTools)
 find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_COMPONENTS Core5Compat)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(Hunspell REQUIRED IMPORTED_TARGET hunspell)
 
 if ((QT_DEFAULT_MAJOR_VERSION GREATER 5))
     qt_standard_project_setup()
@@ -145,7 +147,7 @@ target_link_libraries(VTextEdit PUBLIC
     peg-markdown-highlight
     sonnet-core
     sonnet-hunspell
-    Hunspell
+    PkgConfig::Hunspell
 )
 
 if((QT_DEFAULT_MAJOR_VERSION GREATER 5))
