https://bugs.gentoo.org/947508
https://github.com/pocoproject/poco/pull/4816

From b5873caae53ef9adaecd7d10897c47b0b4812b3e Mon Sep 17 00:00:00 2001
From: Matej Kenda <matejken@gmail.com>
Date: Wed, 11 Dec 2024 16:18:04 +0100
Subject: [PATCH] CMake: fix for missing utf8proc with unbundled build,
 resolves #4798 (#4816)

* fix(cmake): Add missing install and find dependency for utf8proc in unbundled build.

* chore(gitignore): Corrected path to Qt creator generated build files.
---
 .gitignore                                  | 2 +-
 CMakeLists.txt                              | 4 ++--
 Foundation/cmake/PocoFoundationConfig.cmake | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4c163f64de..3a5ed86f82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,7 +48,7 @@ config.make
 
 # Qt Creator #
 #########
-build/
+build/Qt_*
 
 # CMake #
 ########
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 861c27c565..2d120e68fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -557,8 +557,8 @@ install(
 )
 
 if(POCO_UNBUNDLED)
-	install(FILES cmake/FindPCRE2.cmake
-			DESTINATION "${PocoConfigPackageLocation}")
+	install(FILES cmake/FindPCRE2.cmake DESTINATION "${PocoConfigPackageLocation}")
+	install(FILES cmake/FindUtf8Proc.cmake DESTINATION "${PocoConfigPackageLocation}")
 endif()
 
 message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake
index 82c5788940..32b5d83023 100644
--- a/Foundation/cmake/PocoFoundationConfig.cmake
+++ b/Foundation/cmake/PocoFoundationConfig.cmake
@@ -3,6 +3,7 @@ if(@POCO_UNBUNDLED@)
 	list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
 	find_dependency(ZLIB REQUIRED)
 	find_dependency(PCRE2 REQUIRED)
+	find_dependency(Utf8Proc REQUIRED)
 endif()
 
 include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
