  	message(FATAL_ERROR "Makes no sense to compile with neither static nor shared libraries.")
  endif()
  
-@@ -590,7 +592,7 @@
- endif()
- 
- # Put the libraries and binaries that get built into directories at the
--# top of the build tree rather than in hard-to-find leaf directories. 
-+# top of the build tree rather than in hard-to-find leaf directories.
- SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
- SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
- SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
-@@ -663,7 +665,7 @@
- CHECK_INCLUDE_FILE(malloc.h LWS_HAVE_MALLOC_H)
- CHECK_INCLUDE_FILE(pthread.h LWS_HAVE_PTHREAD_H)
- 
--CHECK_LIBRARY_EXISTS(cap cap_set_flag "" LWS_HAVE_LIBCAP) 
-+CHECK_LIBRARY_EXISTS(cap cap_set_flag "" LWS_HAVE_LIBCAP)
- 
- if (LWS_WITH_LIBUV)
- CHECK_INCLUDE_FILE(uv-version.h LWS_HAVE_UV_VERSION_H)
-@@ -685,7 +687,7 @@
- 
- CHECK_INCLUDE_FILES("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
- 
--CHECK_C_SOURCE_COMPILES("#include <stdint.h> 
-+CHECK_C_SOURCE_COMPILES("#include <stdint.h>
- 	int main(void) {
- 		intptr_t test = 1;
- 		return 0;
-@@ -801,7 +803,7 @@
- 
- if (LWS_WITH_MBEDTLS)
-  	set(LWS_WITH_SSL ON)
-- 	
-+
- 	list(APPEND HDR_PRIVATE
- 		lib/tls/mbedtls/wrapper/include/internal/ssl3.h
- 		lib/tls/mbedtls/wrapper/include/internal/ssl_cert.h
-@@ -845,7 +847,7 @@
- 	list(APPEND SOURCES
- 		lib/tls/tls.c
- 	)
--		
-+
- 		if (LWS_WITH_MBEDTLS)
- 			list(APPEND SOURCES
- 				lib/tls/mbedtls/ssl.c
-@@ -875,7 +877,7 @@
- 				)
- 			endif()
- 		endif()
--		
-+
- 	if (NOT LWS_WITHOUT_SERVER)
- 		list(APPEND SOURCES
- 			lib/tls/tls-server.c)
-@@ -897,7 +899,7 @@
- 			list(APPEND SOURCES
- 				lib/tls/openssl/openssl-client.c)
- 		endif()
--		
-+
- 	endif()
- endif()
- 
-@@ -934,10 +936,12 @@
+@@ -934,11 +936,13 @@
  	endif()
  endif()
  
 -if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_SERVER)
--	list(APPEND SOURCES
--		lib/roles/http/server/server.c
--		lib/roles/http/server/lws-spa.c)
 +if (LWS_ROLE_H1 OR LWS_ROLE_H2)
-+  if (NOT LWS_WITHOUT_SERVER)
-+	  list(APPEND SOURCES
-+		  lib/roles/http/server/server.c
-+		  lib/roles/http/server/lws-spa.c)
-+  endif()
++if (NOT LWS_WITHOUT_SERVER)
+ 	list(APPEND SOURCES
+ 		lib/roles/http/server/server.c
+ 		lib/roles/http/server/lws-spa.c)
  endif()
++endif()
  
  if (LWS_ROLE_WS AND NOT LWS_WITHOUT_EXTENSIONS)
-@@ -976,7 +980,7 @@
- if (LWS_WITH_LEJP)
- 	list(APPEND SOURCES
- 		lib/misc/lejp.c)
--endif()	
-+endif()
- if (LWS_WITH_LEJP_CONF)
- 		list(APPEND SOURCES
- 			"lib/roles/http/server/lejp-conf.c"
+ 	list(APPEND HDR_PRIVATE
 @@ -1038,7 +1042,7 @@
  	endif()
  endif()

 	foreach(lib ${LWS_LIBRARIES})
 		set_target_properties(${lib}
 			PROPERTIES
@@ -1520,7 +1526,7 @@
 		endif()
 	endif()
 
-	list(APPEND TEST_SERVER_DATA 
+	list(APPEND TEST_SERVER_DATA
 		"${TEST_SERVER_SSL_KEY}"
 		"${TEST_SERVER_SSL_CERT}")
 endif()
@@ -1532,7 +1538,8 @@
 # Test applications
 #

 			target_link_libraries(websockets dl)
 		endif()
 	endif()
@@ -1873,7 +1880,8 @@
 			endforeach()
 		endif()
