@@ -17,6 +17,7 @@ add_executable(hello_world_server http/hello_world_server.cpp)
1717add_executable (hello_world_client http/hello_world_client.cpp)
1818add_executable (hello_world_async_server_with_work_queue http/hello_world_async_server_with_work_queue.cpp)
1919add_executable (trivial_google trivial_google.cpp)
20+
2021if (UNIX )
2122 add_executable (fileserver http/fileserver.cpp)
2223endif (UNIX )
@@ -66,6 +67,17 @@ target_link_libraries(hello_world_async_server_with_work_queue
6667 cppnetlib-client-connections
6768 cppnetlib-server-parsers)
6869
70+ if (OPENSSL_FOUND)
71+ add_executable (ssl_server http/ssl/ssl_server.cpp)
72+ add_dependencies (ssl_server cppnetlib-uri cppnetlib-client-connections)
73+ target_link_libraries (ssl_server
74+ ${CMAKE_THREAD_LIBS_INIT}
75+ cppnetlib-server-parsers
76+ cppnetlib-uri
77+ cppnetlib-client-connections)
78+ endif (OPENSSL_FOUND)
79+
80+
6981if (OPENSSL_FOUND)
7082 target_link_libraries (http_client${OPENSSL_LIBRARIES} )
7183 target_link_libraries (simple_wget${OPENSSL_LIBRARIES} )
@@ -74,6 +86,7 @@ if (OPENSSL_FOUND)
7486 target_link_libraries (hello_world_server${OPENSSL_LIBRARIES} )
7587 target_link_libraries (hello_world_client${OPENSSL_LIBRARIES} )
7688 target_link_libraries (hello_world_async_server_with_work_queue${OPENSSL_LIBRARIES} )
89+ target_link_libraries (ssl_server${OPENSSL_LIBRARIES} )
7790 target_link_libraries (trivial_google${OPENSSL_LIBRARIES} )
7891endif (OPENSSL_FOUND)
7992
@@ -85,6 +98,7 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU AND ${CMAKE_SYSTEM_NAME} MATCHES "Windo
8598 target_link_libraries (hello_world_server ws2_32 wsock32)
8699 target_link_libraries (hello_world_client ws2_32)
87100 target_link_libraries (hello_world_async_server_with_work_queue ws2_32 wsock32)
101+ target_link_libraries (ssl_server ws2_32 wsock32)
88102 target_link_libraries (trivial_google ws2_32)
89103endif ()
90104
@@ -97,6 +111,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
97111 target_link_libraries (hello_world_client rt)
98112 target_link_libraries (hello_world_async_server_with_work_queue rt)
99113 target_link_libraries (trivial_google rt)
114+ if (OPENSSL_FOUND)
115+ target_link_libraries (ssl_server rt)
116+ endif (OPENSSL_FOUND)
100117endif ()
101118
102119if (UNIX )
@@ -119,7 +136,10 @@ set_target_properties(trivial_google PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-N
119136set_target_properties (hello_world_server PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
120137set_target_properties (hello_world_client PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
121138set_target_properties (hello_world_async_server_with_work_queue PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
122-
139+ if (OPENSSL_FOUND)
140+ set_target_properties (ssl_server PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
141+ endif (OPENSSL_FOUND)
142+
123143if (UNIX )
124144 set_target_properties (fileserver PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR }/example)
125145endif (UNIX )