Made changes CMake v 2.8 compatible. This closes
@@ -61,16 +61,16 @@ else()
endif()
-if (LIBWEBSOCKETS_FOUND)
+if (LIBWEBSOCKETS_FOUND AND LIBWEBSOCKETS_VERSION_STRING)
# This is a fix for DISPATCH-1513. libwebsockets versions 3.2.0 introduces a new flag called LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER
# The new flag allows (as the flag says) HTTP pver HTTPS listeners. Since this flag is not available before lws 3.2.0 we need
# to selectively comment out a test.
set(TEST_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "#")
set(LWS_VERSION_WITH_SSL_FIX "3.2.0")
- if (LIBWEBSOCKETS_VERSION_STRING AND (LIBWEBSOCKETS_VERSION_STRING VERSION_GREATER_EQUAL LWS_VERSION_WITH_SSL_FIX))
+ if ((LIBWEBSOCKETS_VERSION_STRING STREQUAL LWS_VERSION_WITH_SSL_FIX) OR (LIBWEBSOCKETS_VERSION_STRING STRGREATER LWS_VERSION_WITH_SSL_FIX))
set(TEST_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "")
endif()
-endif(LIBWEBSOCKETS_FOUND)
+endif(LIBWEBSOCKETS_FOUND AND LIBWEBSOCKETS_VERSION_STRING)
if(NOT LIBWEBSOCKETS_FOUND)
unset(LIBWEBSOCKETS_LIBRARIES)
