1 cmake_minimum_required(VERSION 2.6)
4 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
6 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
9 INCLUDE_DIRECTORIES(/opt/local/include)
10 LINK_DIRECTORIES(/opt/local/lib)
16 SET(SSL_LIB crypto ssl)
19 ADD_LIBRARY(ustream-ssl SHARED ustream-ssl.c ustream-io.c)
20 TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB})
22 ADD_EXECUTABLE(ustream-example ustream-example.c)
23 TARGET_LINK_LIBRARIES(ustream-example ustream-ssl)
25 SET(CMAKE_INSTALL_PREFIX /usr)
27 FILE(GLOB headers *.h)
28 INSTALL(FILES ${headers}
29 DESTINATION include/libubox
31 INSTALL(TARGETS ustream-ssl
32 LIBRARY DESTINATION lib