aboutsummaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2017-09-17 19:15:03 +0900
committerGitHub <noreply@github.com>2017-09-17 19:15:03 +0900
commit6df366ce1db89fb0d473ae199c653223fc443bf9 (patch)
tree62c34a98f5f21ace43331f34e0ef7b4fa885f578 /examples/CMakeLists.txt
parent4786dac0a8e908345e25a4c79da9175201f6b7fc (diff)
parent4394142d3f0c061b2a1a09b00ca6a7d12da31ddd (diff)
downloadcrow-6df366ce1db89fb0d473ae199c653223fc443bf9.tar.gz
crow-6df366ce1db89fb0d473ae199c653223fc443bf9.zip
Merge pull request #177 from tekn0ir/fix_libssl_example
Fix linking error on OSX & fix websocket example
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index ef65f02..fac0abb 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -19,7 +19,13 @@ endif()
add_executable(example_websocket websocket/example_ws.cpp)
target_link_libraries(example_websocket ${Boost_LIBRARIES})
-target_link_libraries(example_websocket ${CMAKE_THREAD_LIBS_INIT} ssl crypto)
+target_link_libraries(example_websocket ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES})
+add_custom_command(OUTPUT ws.html
+ COMMAND ${CMAKE_COMMAND} -E
+ copy ${PROJECT_SOURCE_DIR}/websocket/templates/ws.html ${CMAKE_CURRENT_BINARY_DIR}/ws.html
+ DEPENDS ${PROJECT_SOURCE_DIR}/websocket/templates/ws.html
+ )
+add_custom_target(example_ws_copy ALL DEPENDS ws.html)
add_executable(example example.cpp)
#target_link_libraries(example crow)