X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=CMakeLists.txt;h=a918e16d08dba2b4132787833a3e7ec6312fa80d;hb=1dc753d6438121ef4cc57b185ea340c082d362c6;hp=1178c62763fb136c26b956f2083fe15e57e265a3;hpb=b0325eb88c76d02563a4d77117ff3dd809a549ea;p=project%2Fustream-ssl.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 1178c62..a918e16 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() @@ -28,8 +35,7 @@ TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB}) ADD_EXECUTABLE(ustream-example ustream-example.c) TARGET_LINK_LIBRARIES(ustream-example ustream-ssl) -FILE(GLOB headers *.h) -INSTALL(FILES ${headers} +INSTALL(FILES ustream-ssl.h DESTINATION include/libubox ) INSTALL(TARGETS ustream-ssl