瀏覽代碼

Merge branch 'vcatechnology-no-files'

bel 10 年之前
父節點
當前提交
5bc867833a
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      CMakeLists.txt

+ 7 - 0
CMakeLists.txt

@@ -60,6 +60,10 @@ set(CIVETWEB_THREAD_STACK_SIZE 102400 CACHE STRING
 set_property(CACHE CIVETWEB_THREAD_STACK_SIZE PROPERTY VALUE ${CIVETWEB_THREAD_STACK_SIZE})
 message(STATUS "Thread Stack Size - ${CIVETWEB_THREAD_STACK_SIZE}")
 
+# Serve no files from the web server
+option(CIVETWEB_ENABLE_SERVE_FILES "Configures the server to serve static files" ON)
+message(STATUS "Serve files - ${CIVETWEB_ENABLE_SERVE_FILES}")
+
 # C++ wrappers
 option(CIVETWEB_ENABLE_CXX "Enables the C++ wrapper library" OFF)
 message(STATUS "C++ wrappers - ${CIVETWEB_ENABLE_CXX}")
@@ -337,6 +341,9 @@ endif()
 if (CIVETWEB_ENABLE_WEBSOCKETS)
   add_definitions(-DUSE_WEBSOCKET)
 endif()
+if (NOT CIVETWEB_ENABLE_SERVE_FILES)
+  add_definitions(-DNO_FILES)
+endif()
 if (CIVETWEB_ENABLE_LUA)
   add_definitions(-DUSE_LUA)
 endif()