summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-23 04:01:09 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-10-23 04:01:09 +0200
commitfdbedf748f4c2654fe85f613216a2dacc407c0a7 (patch)
tree1e873d3b0acd0628d6a96519e965ecbbef68c312 /CMakeLists.txt
downloadustream-ssl-fdbedf748f4c2654fe85f613216a2dacc407c0a7.tar.gz
Initial import
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..bd8ce3f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(ustream-ssl C)
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+
+#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include/cyassl)
+#LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib)
+IF(APPLE)
+ INCLUDE_DIRECTORIES(/opt/local/include)
+ LINK_DIRECTORIES(/opt/local/lib)
+ENDIF()
+
+IF (CYASSL)
+ SET(SSL_LIB cyassl)
+ELSE()
+ SET(SSL_LIB crypto ssl)
+ENDIF()
+
+ADD_LIBRARY(ustream-ssl SHARED ustream-ssl.c ustream-io.c)
+TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB})
+
+ADD_EXECUTABLE(ustream-example ustream-example.c)
+TARGET_LINK_LIBRARIES(ustream-example ustream-ssl)
+
+SET(CMAKE_INSTALL_PREFIX /usr)