aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2016-09-06 09:40:55 +0900
committerJaeseung Ha <ipknhama@gmail.com>2016-09-06 09:40:55 +0900
commit2cf77c7053db4a14d924573613b6969d8fc51719 (patch)
treef8cb3bab392888dff1c59d0befbc39a8e2e0a6fd /examples
parente9d41a637303a8b9b1062b10325f75f2a18430f7 (diff)
downloadcrow-2cf77c7053db4a14d924573613b6969d8fc51719.tar.gz
crow-2cf77c7053db4a14d924573613b6969d8fc51719.zip
Skip building SSL example if OpenSSL is not found
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 1e96dea..ef65f02 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -11,9 +11,11 @@ add_executable(helloworld helloworld.cpp)
target_link_libraries(helloworld ${Boost_LIBRARIES})
target_link_libraries(helloworld ${CMAKE_THREAD_LIBS_INIT})
+if (OPENSSL_FOUND)
add_executable(example_ssl ssl/example_ssl.cpp)
target_link_libraries(example_ssl ${Boost_LIBRARIES})
-target_link_libraries(example_ssl ${CMAKE_THREAD_LIBS_INIT} ssl crypto)
+target_link_libraries(example_ssl ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES})
+endif()
add_executable(example_websocket websocket/example_ws.cpp)
target_link_libraries(example_websocket ${Boost_LIBRARIES})