--- ./tests/CMakeLists.txt.orig
+++ ./tests/CMakeLists.txt
@@ -58,7 +58,9 @@
         LINKER_LANGUAGE     C)
 endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
 
-add_subdirectory(comparerenderer)
+if (GRAPHITE2_COMPARE_RENDERER)
+    add_subdirectory(comparerenderer)
+endif (GRAPHITE2_COMPARE_RENDERER)
 add_subdirectory(endian)
 add_subdirectory(bittwiddling)
 if (NOT GRAPHITE2_NFILEFACE)
