X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=CMakeLists.txt;h=7e2ddf56b64476f3372fc5842648ab3fa3d9e983;hb=84c7f315bccabaa9853264a4e640f58cdb6b4ed4;hp=f6009e7ba6824521c016758eee17255b6531a06d;hpb=e8ec1e56c3ec71b0eeeeac8842b6519548f3c695;p=project%2Fustream-ssl.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f6009e7..7e2ddf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.6) +INCLUDE(CheckIncludeFiles) + PROJECT(ustream-ssl C) ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) @@ -15,6 +17,11 @@ IF(POLARSSL) SET(SSL_SRC ustream-polarssl.c) SET(SSL_LIB polarssl m) ELSEIF(CYASSL) + CHECK_INCLUDE_FILES (cyassl/version.h HAVE_CYASSL_VERSION_H) + SET(CMAKE_EXTRA_INCLUDE_FILES cyassl/ssl.h) + IF (HAVE_CYASSL_VERSION_H) + ADD_DEFINITIONS(-DHAVE_CYASSL_VERSION_H) + ENDIF() SET(SSL_SRC ustream-io-cyassl.c ustream-openssl.c) SET(SSL_LIB cyassl m) ELSE() @@ -25,8 +32,8 @@ ENDIF() ADD_LIBRARY(ustream-ssl SHARED ustream-ssl.c ${SSL_SRC}) TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB}) -ADD_EXECUTABLE(ustream-example ustream-example.c) -TARGET_LINK_LIBRARIES(ustream-example ustream-ssl) +ADD_EXECUTABLE(ustream-example-server ustream-example-server.c) +TARGET_LINK_LIBRARIES(ustream-example-server ustream-ssl) INSTALL(FILES ustream-ssl.h DESTINATION include/libubox