--- tests/CMakeLists.txt.orig	2025-10-20 13:41:49 UTC
+++ tests/CMakeLists.txt
@@ -7,7 +7,9 @@ add_subdirectory(libdnf/sack)
 add_subdirectory(libdnf/repo)
 add_subdirectory(libdnf/transaction)
 add_subdirectory(libdnf/sack)
+if (BUILD_TESTING)
 add_subdirectory(hawkey)
+endif()
 add_subdirectory(libdnf)
 
 set(LIBDNF_TEST_SOURCES
