find_package doesn't find Libwebsockets (with capital "L"). Eventually it finds
libwebsockets with pkg-config, but includes libwebsockets.a on the path first,
so the resulting library links libwebsockets statically.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,11 +13,11 @@
 set(SOURCE_FILES src/server.c src/http.c src/protocol.c src/utils.c)
 
 find_package(OpenSSL REQUIRED)
-find_package(Libwebsockets ${LIBWEBSOCKETS_MIN_VERSION} QUIET)
+find_package(libwebsockets ${LIBWEBSOCKETS_MIN_VERSION} QUIET)
 
 find_package(PkgConfig)
 
-if(Libwebsockets_FOUND)
+if(libwebsockets_FOUND)
     set(LIBWEBSOCKETS_INCLUDE_DIR ${LIBWEBSOCKETS_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS})
 else() # try to find libwebsockets with pkg-config
     pkg_check_modules(Libwebsockets REQUIRED libwebsockets>=${LIBWEBSOCKETS_MIN_VERSION})
