diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32b43d2e2591201b84992a4e5aabf794d72f05d8..6d07b943fc71e4bd519aa8f15cc7ce028664fce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,9 @@
 cmake_minimum_required(VERSION 3.1)
 project (dap_udp_server C)
 
-add_subdirectory(libdap-server-core)
+if(NOT ${SUBMODULES_NO_BUILD} MATCHES ON)
+    add_subdirectory(libdap-server-core)
+endif()
 
 if(BUILD_DAP_UDP_SERVER_TESTS)
     enable_testing()