From cb4156d437427bbf4aad858cc1021d80603abc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20So=CC=88derberg?= Date: Wed, 6 Feb 2013 15:30:56 +0900 Subject: [PATCH] Cleaned up the CyaSSL linking in the CMake project a bit. Separated the CyaSSL linking and OpenSSL linking for more clearity. Now tested on both OSX and Windows as well. --- CMakeLists.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6baaf914..cd9d1b06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,20 +327,22 @@ if (WITH_SSL) if (USE_CYASSL) # Use CyaSSL as OpenSSL replacement. - set(OPENSSL_LIBRARIES ${CYASSL_LIB}) - set(OPENSSL_INCLUDE_DIR ${CYASSL_INCLUDE_DIRS}) - set(OPENSSL_FOUND 1) + # TODO: Add a find_package command for this also. + message("CyaSSL include dir: ${CYASSL_INCLUDE_DIRS}") + message("CyaSSL libraries: ${CYASSL_LIB}") + + include_directories(${CYASSL_INCLUDE_DIRS}) + target_link_libraries(websockets ${CYASSL_LIB}) else() # TODO: Add support for STATIC also. find_package(OpenSSL REQUIRED) - # TODO: Find OpenSSL binaries and copy them to the output directories for the test-apps so that they can be run out of the box. - endif() + message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}") + message("OpenSSL libraries: ${OPENSSL_LIBRARIES}") - message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}") - message("OpenSSL libraries: ${OPENSSL_LIBRARIES}") - include_directories(${OPENSSL_INCLUDE_DIR}) - target_link_libraries(websockets ${OPENSSL_LIBRARIES}) + include_directories(${OPENSSL_INCLUDE_DIR}) + target_link_libraries(websockets ${OPENSSL_LIBRARIES}) + endif() endif(WITH_SSL) #