--- CMakeLists.txt.orig	2021-12-29 09:04:08 UTC
+++ CMakeLists.txt
@@ -172,9 +172,13 @@ else()
   add_subdirectory(fdbservice)
 endif()
 add_subdirectory(fdbbackup)
-add_subdirectory(contrib)
+if(WITH_CONTRIB)
+  add_subdirectory(contrib)
+endif()
 add_subdirectory(tests)
-add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+if(WITH_FLOWBENCH)
+  add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+endif()
 if(WITH_PYTHON AND WITH_C_BINDING)
   add_subdirectory(bindings)
 endif()
