cmake: Find libubox/ustream.h header file
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 1 Jul 2016 23:04:51 +0000 (16:04 -0700)
committerJohn Crispin <john@phrozen.org>
Fri, 1 Jul 2016 13:18:15 +0000 (15:18 +0200)
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

index 2ce9bf894219f0c1cc95f68e24394be4fa8cca01..49e79a1f2694fe88ba70f62bf0daf1f4037250ff 100644 (file)
@@ -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})