diff --git a/CMakeLists.txt b/CMakeLists.txt index daa75df1..34e58d31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,7 +190,5 @@ add_subdirectory (test) add_subdirectory (example) if (OPENSSL_FOUND) - add_subdirectory (example/ssl-http-client) - add_subdirectory (example/ssl-websocket-client) add_subdirectory (test/websocket/ssl) endif() diff --git a/doc/2_examples.qbk b/doc/2_examples.qbk index dc12f50a..5a3bfbae 100644 --- a/doc/2_examples.qbk +++ b/doc/2_examples.qbk @@ -57,7 +57,7 @@ as measured by Alexa. This example demonstrates sending and receiving HTTP messages over a TLS connection. Requires OpenSSL to build. -* [repo_file example/ssl-http-client/ssl_http_client.cpp] +* [repo_file example/http-client-ssl/http_client_ssl.cpp] [endsect] @@ -68,7 +68,7 @@ over a TLS connection. Requires OpenSSL to build. Establish a WebSocket connection over an encrypted TLS connection, send a message and receive the reply. Requires OpenSSL to build. -* [repo_file example/ssl-websocket-client/ssl_websocket_client.cpp] +* [repo_file example/websocket-client-ssl/websocket_client_ssl.cpp] [endsect] diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 78e5dc52..daff6085 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -5,3 +5,8 @@ add_subdirectory (http-client) add_subdirectory (http-crawl) add_subdirectory (server-framework) add_subdirectory (websocket-client) + +if (OPENSSL_FOUND) + add_subdirectory (http-client-ssl) + add_subdirectory (websocket-client-ssl) +endif() diff --git a/example/http-client-ssl/CMakeLists.txt b/example/http-client-ssl/CMakeLists.txt new file mode 100644 index 00000000..f3484aec --- /dev/null +++ b/example/http-client-ssl/CMakeLists.txt @@ -0,0 +1,14 @@ +# Part of Beast + +GroupSources(include/beast beast) + +GroupSources(example/http-client-ssl "/") + +include_directories(${OPENSSL_INCLUDE_DIR}) + +add_executable (http-client-ssl + ${BEAST_INCLUDES} + http_client_ssl.cpp +) + +target_link_libraries(http-client-ssl Beast ${OPENSSL_LIBRARIES}) diff --git a/example/ssl-http-client/Jamfile b/example/http-client-ssl/Jamfile similarity index 93% rename from example/ssl-http-client/Jamfile rename to example/http-client-ssl/Jamfile index aaae4689..47875331 100644 --- a/example/ssl-http-client/Jamfile +++ b/example/http-client-ssl/Jamfile @@ -43,7 +43,7 @@ project crypto ; -exe ssl-http-client +exe http-client-ssl : - ssl_http_client.cpp + http_client_ssl.cpp ; diff --git a/example/ssl-http-client/ssl_http_client.cpp b/example/http-client-ssl/http_client_ssl.cpp similarity index 100% rename from example/ssl-http-client/ssl_http_client.cpp rename to example/http-client-ssl/http_client_ssl.cpp diff --git a/example/ssl-http-client/CMakeLists.txt b/example/ssl-http-client/CMakeLists.txt deleted file mode 100644 index d7d18e9c..00000000 --- a/example/ssl-http-client/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Part of Beast - -GroupSources(include/beast beast) - -GroupSources(example/ssl-http-client "/") - -include_directories(${OPENSSL_INCLUDE_DIR}) - -add_executable (ssl-http-client - ${BEAST_INCLUDES} - ssl_http_client.cpp -) - -target_link_libraries(ssl-http-client Beast ${OPENSSL_LIBRARIES}) diff --git a/example/ssl-websocket-client/CMakeLists.txt b/example/ssl-websocket-client/CMakeLists.txt deleted file mode 100644 index 19abb422..00000000 --- a/example/ssl-websocket-client/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Part of Beast - -GroupSources(include/beast beast) - -GroupSources(example/ssl-websocket-client "/") - -include_directories(${OPENSSL_INCLUDE_DIR}) - -add_executable (ssl-websocket-client - ${BEAST_INCLUDES} - ssl_websocket_client.cpp -) - -target_link_libraries(ssl-websocket-client Beast ${OPENSSL_LIBRARIES}) diff --git a/example/websocket-client-ssl/CMakeLists.txt b/example/websocket-client-ssl/CMakeLists.txt new file mode 100644 index 00000000..38862e02 --- /dev/null +++ b/example/websocket-client-ssl/CMakeLists.txt @@ -0,0 +1,14 @@ +# Part of Beast + +GroupSources(include/beast beast) + +GroupSources(example/websocket-client-ssl "/") + +include_directories(${OPENSSL_INCLUDE_DIR}) + +add_executable (websocket-client-ssl + ${BEAST_INCLUDES} + websocket_client_ssl.cpp +) + +target_link_libraries(websocket-client-ssl Beast ${OPENSSL_LIBRARIES}) diff --git a/example/ssl-websocket-client/Jamfile b/example/websocket-client-ssl/Jamfile similarity index 100% rename from example/ssl-websocket-client/Jamfile rename to example/websocket-client-ssl/Jamfile diff --git a/example/ssl-websocket-client/ssl_websocket_client.cpp b/example/websocket-client-ssl/websocket_client_ssl.cpp similarity index 100% rename from example/ssl-websocket-client/ssl_websocket_client.cpp rename to example/websocket-client-ssl/websocket_client_ssl.cpp