Reorganize SSL examples

This commit is contained in:
Vinnie Falco
2017-07-20 08:15:27 -07:00
parent d12d686167
commit 9be141a1e0
11 changed files with 88 additions and 34 deletions
+4
View File
@@ -10,3 +10,7 @@ build-project http-client ;
build-project http-crawl ;
build-project server-framework ;
build-project websocket-client ;
# VFALCO How do I make this work on Windows and if OpenSSL is not available?
#build-project ssl-http-client ;
#build-project ssl-websocket-client ;
+14
View File
@@ -0,0 +1,14 @@
# 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})
@@ -43,12 +43,7 @@ project
<library>crypto
;
exe http-ssl-example
exe ssl-http-client
:
http_ssl_example.cpp
;
exe websocket-ssl-example
:
websocket_ssl_example.cpp
ssl_http_client.cpp
;
@@ -0,0 +1,14 @@
# 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})
+49
View File
@@ -0,0 +1,49 @@
#
# Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
import os ;
if [ os.name ] = SOLARIS
{
lib socket ;
lib nsl ;
}
else if [ os.name ] = NT
{
lib ws2_32 ;
lib mswsock ;
}
else if [ os.name ] = HPUX
{
lib ipv6 ;
}
else if [ os.name ] = HAIKU
{
lib network ;
}
if [ os.name ] = NT
{
lib ssl : : <name>ssleay32 ;
lib crypto : : <name>libeay32 ;
}
else
{
lib ssl ;
lib crypto ;
}
project
: requirements
<library>ssl
<library>crypto
;
exe ssl-websocket-client
:
ssl_websocket_client.cpp
;
-24
View File
@@ -1,24 +0,0 @@
# Part of Beast
GroupSources(extras/beast extras)
GroupSources(include/beast beast)
GroupSources(example/ssl "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (http-ssl-example
${BEAST_INCLUDES}
${EXTRAS_INCLUDES}
http_ssl_example.cpp
)
target_link_libraries(http-ssl-example Beast ${OPENSSL_LIBRARIES})
add_executable (websocket-ssl-example
${BEAST_INCLUDES}
${EXTRAS_INCLUDES}
websocket_ssl_example.cpp
)
target_link_libraries(websocket-ssl-example Beast ${OPENSSL_LIBRARIES})