projects
/
project
/
ustream-ssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add version detection of CyaSSL and make the cyassl backend compatible with both...
[project/ustream-ssl.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index 1178c62763fb136c26b956f2083fe15e57e265a3..a918e16d08dba2b4132787833a3e7ec6312fa80d 100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-1,5
+1,7
@@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.6)
+INCLUDE(CheckIncludeFiles)
+
PROJECT(ustream-ssl C)
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
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)
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()
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)
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
DESTINATION include/libubox
)
INSTALL(TARGETS ustream-ssl