ustream-ssl: add support for using a fd instead of ustream as backing
[project/ustream-ssl.git] / CMakeLists.txt
index c98b12ac8d99353d4bf4e5c2e662343a8123f32a..2e591ee76b4a2c9d8642ae9620266c43fa245eda 100644 (file)
@@ -10,6 +10,9 @@ ENDIF()
 ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+IF (NOT APPLE)
+  SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+ENDIF()
 
 IF(MBEDTLS)
   ADD_DEFINITIONS(-DHAVE_MBEDTLS)
@@ -42,9 +45,15 @@ TARGET_LINK_LIBRARIES(ustream-example-server ustream-ssl)
 ADD_EXECUTABLE(ustream-example-client ustream-example-client.c)
 TARGET_LINK_LIBRARIES(ustream-example-client ustream-ssl)
 
+TARGET_COMPILE_DEFINITIONS(ustream-ssl PRIVATE $<$<CONFIG:Debug>:DEBUG>)
+
 INSTALL(FILES ustream-ssl.h
        DESTINATION include/libubox
 )
 INSTALL(TARGETS ustream-ssl
        LIBRARY DESTINATION lib
 )
+
+IF(ABIVERSION)
+       SET_TARGET_PROPERTIES(ustream-ssl PROPERTIES VERSION ${ABIVERSION})
+ENDIF()