diff mbox

[LEDE-DEV,ustream-ssl] cmake: Find libubox/ustream.h header file

Message ID 1467414291-11571-1-git-send-email-f.fainelli@gmail.com
State Accepted
Headers show

Commit Message

Florian Fainelli July 1, 2016, 11:04 p.m. UTC
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/ustream-ssl.h.  Some external toolchains which do not include
standard locations would fail to find the header otherwise.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ce9bf894219..49e79a1f2694 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,9 @@  ELSE()
   SET(SSL_LIB crypto ssl)
 ENDIF()
 
+FIND_PATH(ubox_include_dir libubox/ustream.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 ADD_LIBRARY(ustream-ssl SHARED ustream-ssl.c ${SSL_SRC})
 TARGET_LINK_LIBRARIES(ustream-ssl ubox ${SSL_LIB})