dummy handler: LWS_CALLBACK_HTTP_FILE_COMPLETION
[platform/upstream/libwebsockets.git] / CMakeLists.txt
index 0299b60..aed2ee6 100644 (file)
@@ -95,7 +95,7 @@ option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF)
 option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON)
 option(LWS_IPV6 "Compile with support for ipv6" OFF)
 option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF)
-option(LWS_WITH_HTTP2 "Compile with support for http2" OFF)
+#option(LWS_WITH_HTTP2 "Compile with support for http2" OFF)
 option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF)
 option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
 option(LWS_WITH_HTTP_PROXY "Support for rewriting HTTP proxying (requires libhubbub)" OFF)
@@ -517,6 +517,12 @@ set(LWS_HAVE_WORKING_VFORK LWS_HAVE_VFORK)
 
 CHECK_INCLUDE_FILES("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
 
+CHECK_C_SOURCE_COMPILES("#include <stdint.h> 
+       int main(void) {
+               intptr_t test = 1;
+               return 0;
+       }" LWS_HAS_INTPTR_T)
+
 # These don't work Cross...
 #CHECK_TYPE_SIZE(pid_t PID_T_SIZE)
 #CHECK_TYPE_SIZE(size_t SIZE_T_SIZE)
@@ -1241,9 +1247,9 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                        create_test_app(test-server "test-server/test-server.c"
                                "test-server/test-server-http.c"
                                "test-server/test-server-dumb-increment.c"
-                               "test-server/test-server-mirror.c"
-                               "test-server/test-server-status.c"
-                               "test-server/test-server-echogen.c")
+                               ""
+                               ""
+                               "")
                        if (UNIX)
                                create_test_app(test-fuzxy "test-server/fuzxy.c"
                                        ""
@@ -1257,9 +1263,9 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                                        "test-server/test-server-pthreads.c"
                                        "test-server/test-server-http.c"
                                        "test-server/test-server-dumb-increment.c"
-                                       "test-server/test-server-mirror.c"
-                                       "test-server/test-server-status.c"
-                                       "test-server/test-server-echogen.c")
+                                       ""
+                                       ""
+                                       "")
                        endif()
                        if (NOT ((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
                                AND LWS_WITH_LIBEV)
@@ -1267,19 +1273,21 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                                        "test-server/test-server-libev.c"
                                        "test-server/test-server-http.c"
                                        "test-server/test-server-dumb-increment.c"
-                                       "test-server/test-server-mirror.c"
-                                       "test-server/test-server-status.c"
-                                       "test-server/test-server-echogen.c")
+                                       ""
+                                       ""
+                                       "")
+                               # libev generates a big mess of warnings with gcc, maintainers blame gcc
+                               set_source_files_properties( test-server/test-server-libev.c PROPERTIES COMPILE_FLAGS "-Wno-error" )
                        endif()
                        if (NOT ((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
                                AND LWS_WITH_LIBUV)
                                create_test_app(test-server-libuv
                                        "test-server/test-server-libuv.c"
                                        "test-server/test-server-http.c"
-                                       "test-server/test-server-dumb-increment.c"
-                                       "test-server/test-server-mirror.c"
-                                       "test-server/test-server-status.c"
-                                       "test-server/test-server-echogen.c")
+                                       ""
+                                       ""
+                                       ""
+                                       "")
                        endif()
                        if (NOT ((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
                                AND LWS_WITH_LIBEVENT)
@@ -1287,9 +1295,9 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                                        "test-server/test-server-libevent.c"
                                        "test-server/test-server-http.c"
                                        "test-server/test-server-dumb-increment.c"
-                                       "test-server/test-server-mirror.c"
-                                       "test-server/test-server-status.c"
-                                       "test-server/test-server-echogen.c")
+                                       ""
+                                       ""
+                                       "")
                        endif()
                endif()
 
@@ -1300,9 +1308,9 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                        create_test_app(test-server-extpoll "test-server/test-server.c"
                                "test-server/test-server-http.c"
                                "test-server/test-server-dumb-increment.c"
-                               "test-server/test-server-mirror.c"
-                               "test-server/test-server-status.c"
-                               "test-server/test-server-echogen.c")
+                               ""
+                               ""
+                               "")
                        # Set defines for this executable only.
                        set_property(
                                TARGET test-server-extpoll
@@ -1435,6 +1443,8 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                endmacro()
                
 
+               create_plugin(protocol_lws_meta
+                             "plugins/protocol_lws_meta.c" "" "")
                create_plugin(protocol_dumb_increment
                              "plugins/protocol_dumb_increment.c" "" "")
                create_plugin(protocol_lws_mirror
@@ -1805,6 +1815,7 @@ message(" LWS_HAVE_LIBCAP = ${LWS_HAVE_LIBCAP}")
 message(" LWS_HAVE_ATOLL = ${LWS_HAVE_ATOLL}")
 message(" LWS_HAVE__ATOI64 = ${LWS_HAVE__ATOI64}")
 message(" LWS_HAVE_STAT32I64 = ${LWS_HAVE_STAT32I64}")
+message(" LWS_HAS_INTPTR_T = ${LWS_HAS_INTPTR_T}")
 
 message("---------------------------------------------------------------------")