diff options
author | Petr Štetiar <ynezz@true.cz> | 2020-12-08 16:37:42 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-12-09 08:03:11 +0100 |
commit | c26f71e844df078d2b52307594022bf4924b4915 (patch) | |
tree | ce69102e268ac75cb82a01733ea7eaf420516c9a | |
parent | 50abd211c4a2c66748d4e7dc2afcb202b5f529b1 (diff) | |
download | ustream-ssl-c26f71e844df078d2b52307594022bf4924b4915.tar.gz |
cmake: fix building out of the tree
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>
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 86e1b07..315aeb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,9 +34,10 @@ ENDIF() 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) |