Retrieved from: https://git.pld-linux.org/?p=packages/bc-ispell.git;a=blob_plain;f=ispell-cmake.patch;hb=HEAD

--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt.orig	2023-11-07 11:53:37.000000000 +0100
+++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt	2024-03-28 20:53:45.068632010 +0100
@@ -49,6 +49,26 @@ set(ISPELL_SOURCES
 
 add_library(${ISPELL_TARGET_NAME} SHARED ${ISPELL_SOURCES})
 
+set(CMAKE_MODULES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${ISPELL_TARGET_NAME}")
+configure_package_config_file("${ISPELL_TARGET_NAME}Config.cmake.in" "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+        INSTALL_DESTINATION "${CMAKE_MODULES_INSTALL_DIR}"
+        NO_SET_AND_CHECK_MACRO
+)
+write_basic_package_version_file("${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
+        VERSION ${PROJECT_VERSION}
+        COMPATIBILITY AnyNewerVersion
+)
+install(FILES
+        "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+        "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
+        DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
+)
+
+install(EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
+        FILE "${ISPELL_TARGET_NAME}LibraryDepends.cmake"
+        DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
+)
+
 install(TARGETS ${ISPELL_TARGET_NAME}
   EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in.orig	2023-11-07 11:53:37.000000000 +0100
+++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in	2024-03-28 21:54:40.692161132 +0100
@@ -12,7 +12,7 @@ set(ISPELL_LIBRARIES "@ISPELL_TARGET_NAM
 get_target_property(ISPELL_INCLUDE_DIRS "@ISPELL_TARGET_NAME@" INTERFACE_INCLUDE_DIRECTORIES)
 
 if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18.0)
-    add_library(@ISpell_TARGET_NAME@::@ISpell_TARGET_NAME@ ALIAS @ISpell_TARGET_NAME@)
+    add_library(@ISPELL_TARGET_NAME@::@ISPELL_TARGET_NAME@ ALIAS @ISPELL_TARGET_NAME@)
 endif()
 
-check_required_components(@ISpell_TARGET_NAME@)
+check_required_components(@ISPELL_TARGET_NAME@)
