--- CMakeLists.txt.orig	2023-11-30 17:00:43 UTC
+++ CMakeLists.txt
@@ -166,12 +166,17 @@ if (QT_MAJOR_VERSION STREQUAL "5")
 endif()
 
 if (QT_MAJOR_VERSION STREQUAL "5")
-    find_package(kImageAnnotator)
-    set_package_properties(kImageAnnotator PROPERTIES URL "https://github.com/ksnip/kImageAnnotator" DESCRIPTION "The kImageAnnotator library provides tools to annotate" TYPE REQUIRED)
-    if(kImageAnnotator_FOUND)
+    find_package(kImageAnnotator QUIET)
+    set(KIMAGEANNOTATOR_SUFFIX "")
+    if(NOT kImageAnnotator_FOUND)
+        set(KIMAGEANNOTATOR_SUFFIX "-Qt${QT_MAJOR_VERSION}")
+        find_package(kImageAnnotator${KIMAGEANNOTATOR_SUFFIX})
+    endif()
+    set_package_properties(kImageAnnotator${KIMAGEANNOTATOR_SUFFIX} PROPERTIES URL "https://github.com/ksnip/kImageAnnotator" DESCRIPTION "The kImageAnnotator library provides tools to annotate" TYPE REQUIRED)
+    if(kImageAnnotator${KIMAGEANNOTATOR_SUFFIX}_FOUND)
         set(KIMAGEANNOTATOR_FOUND 1)
-        find_package(kColorPicker REQUIRED)
-        if(NOT kImageAnnotator_VERSION VERSION_LESS 0.5.0)
+        find_package(kColorPicker${KIMAGEANNOTATOR_SUFFIX} REQUIRED)
+        if(NOT kImageAnnotator${KIMAGEANNOTATOR_SUFFIX}_VERSION VERSION_LESS 0.5.0)
             set(KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS 1)
         endif()
     endif()
