Index: plugins/CMakeLists.txt
--- plugins/CMakeLists.txt.orig
+++ plugins/CMakeLists.txt
@@ -23,10 +23,12 @@ macro(check_obs_browser)
 endmacro()
 
 macro(check_obs_websocket)
-  if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt")
-    message(FATAL_ERROR "Required submodule 'obs-websocket' not available.")
-  else()
-    add_subdirectory(obs-websocket)
+  if(ENABLE_WEBSOCKET)
+    if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt")
+      message(FATAL_ERROR "Required submodule 'obs-websocket' not available.")
+    else()
+      add_subdirectory(obs-websocket)
+    endif()
   endif()
 endmacro()
 
