--- tests/CMakeLists.txt.orig	2021-03-01 17:31:02 UTC
+++ tests/CMakeLists.txt
@@ -3,7 +3,9 @@ add_subdirectory(libdnf/module)
 add_subdirectory(libdnf/repo)
 add_subdirectory(libdnf/transaction)
 add_subdirectory(libdnf/sack)
+if (BUILD_TESTING)
 add_subdirectory(hawkey)
+endif()
 add_subdirectory(libdnf)
 
 
