When building out of the tree, linker is unable to find the ubox library
so fix it by using find_library CMake command.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
FIND_PATH(ubox_include_dir libubox/ustream.h)
INCLUDE_DIRECTORIES(${ubox_include_dir})
+FIND_LIBRARY(ubox_library NAMES ubox)
ADD_LIBRARY(ustream-ssl SHARED ustream-ssl.c ${SSL_SRC})
-TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB})
+TARGET_LINK_LIBRARIES(ustream-ssl ${ubox_library} ${SSL_LIB})
ADD_EXECUTABLE(ustream-example-server ustream-example-server.c)
TARGET_LINK_LIBRARIES(ustream-example-server ustream-ssl)