--- CMakeLists.txt.orig	2018-09-03 10:33:31.000000000 -0700
+++ CMakeLists.txt	2018-09-03 10:42:57.000000000 -0700
@@ -384,6 +384,7 @@
 
 IF(NOT PODOFO_BUILD_LIB_ONLY)
 
+IF(PODOFO_BUILD_TESTS)
 FIND_PACKAGE(CppUnit)
 
 IF(CppUnit_FOUND)
@@ -394,6 +395,10 @@
   MESSAGE("Cppunit not found. No unit tests will be built.")
 ENDIF(CppUnit_FOUND)
 
+ELSE(PODOFO_BUILD_TESTS)
+  MESSAGE("Tests disabled. No unit tests will be built.")
+ENDIF(PODOFO_BUILD_TESTS)
+
 ENDIF(NOT PODOFO_BUILD_LIB_ONLY)
 
 FIND_PACKAGE(OpenSSL)