Fix cyassl flags, update documentation
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f7642f..e97cb3f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,6 +77,7 @@
 	if ("${LWS_CYASSL_LIB}" STREQUAL "" OR "${LWS_CYASSL_INCLUDE_DIRS}" STREQUAL "")
 		message(FATAL_ERROR "You must set LWS_CYASSL_LIB and LWS_CYASSL_INCLUDE_DIRS when LWS_USE_CYASSL is turned on")
 	endif()
+	set(USE_CYASSL 1)
 endif()
 
 if (LWS_WITHOUT_EXTENSIONS)
@@ -435,7 +436,7 @@
 		# Additional to the root directory we need to include
 		# the cyassl/ subdirectory which contains the OpenSSL
 		# compatability layer headers.
-		foreach(inc ${CYASSL_INCLUDE_DIRS})
+		foreach(inc ${LWS_CYASSL_INCLUDE_DIRS})
 			include_directories("${inc}" "${inc}/cyassl")
 		endforeach()
 
diff --git a/README.build b/README.build
index a2e0ba6..7c4a8b0 100644
--- a/README.build
+++ b/README.build
@@ -122,22 +122,17 @@
 It contains a OpenSSL compatability layer which makes it possible to pretty
 much link to it instead of OpenSSL, giving a much smaller footprint.
 
-NOTE: At the time of writing this the current release of CyaSSL contains a 
-crash bug due to some APIs libwebsocket uses. To be able to use this you will
-need to use the current HEAD in their official repository:
-	https://github.com/cyassl/cyassl
-
-NOTE: cyassl needs to be compiled using the --enable-opensslExtra flag for
+NOTE: cyassl needs to be compiled using the --enable-opensslextra flag for
 this to work.
 
 Compiling libwebsockets with CyaSSL
 -----------------------------------
 
-cmake -DUSE_CYASSL=1 
-	  -DCYASSL_INCLUDE_DIRS=/path/to/cyassl 
-	  -DCYASSL_LIB=/path/to/cyassl/cyassl.a ..
+cmake .. -DLWS_USE_CYASSL=1 \
+	 -DLWS_CYASSL_INCLUDE_DIRS=/path/to/cyassl \
+	 -DLWS_CYASSL_LIB=/path/to/cyassl/cyassl.a ..
 
-NOTE: On windows use the .lib file extension for CYASSL_LIB instead.
+NOTE: On windows use the .lib file extension for LWS_CYASSL_LIB instead.
 
 Cross compiling
 ---------------
diff --git a/config.h.cmake b/config.h.cmake
index 0c2dbfb..e1dd8c0 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -6,7 +6,7 @@
 
 /* Define to 1 to use CyaSSL as a replacement for OpenSSL. 
  * LWS_OPENSSL_SUPPORT needs to be set also for this to work. */
-#cmakedefine USE_CYASSL ${LWS_USE_CYASSL}
+#cmakedefine USE_CYASSL
 
 /* The Libwebsocket version */
 #cmakedefine LWS_LIBRARY_VERSION "${LWS_LIBRARY_VERSION}"