diff --git a/components/calibration/CMakeLists.txt b/components/calibration/CMakeLists.txt
index d486ab29206047ae5b6d921c01d402e0780d5f4d..00faed0b6a4c0cd5292048d8580fc6cbc0657d63 100644
--- a/components/calibration/CMakeLists.txt
+++ b/components/calibration/CMakeLists.txt
@@ -19,4 +19,6 @@ target_include_directories(ftlcalibration
 
 target_link_libraries(ftlcalibration ftlcommon Threads::Threads ${OpenCV_LIBS} Eigen3::Eigen ceres)
 
-ADD_SUBDIRECTORY(test)
+if (BUILD_TESTS)
+	ADD_SUBDIRECTORY(test)
+endif()