diff --git a/CMakeLists.txt b/CMakeLists.txt
index d06356382f3c9aec89cc1427d8d7fc0aa8340f71..b22d21b0b3c9974d31d9fc054a7618524594c227 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,8 @@ add_custom_target(check
 # Specify the .cpp files for the executables
 add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp src/Services/TestService.cpp)
 
+IF(EXISTS lib/Catch2)
 add_subdirectory(lib/Catch2)
 add_executable(tests src/Message.cpp src/Service.cpp src/Services/TestService.cpp tests/tests.cpp tests/Message.cpp)
 target_link_libraries(tests Catch2::Catch2)
+ENDIF()