cmake: Find libubox/ustream-ssl.h header file
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 1 Jul 2016 23:03:47 +0000 (16:03 -0700)
committerFelix Fietkau <nbd@nbd.name>
Sat, 2 Jul 2016 08:13:20 +0000 (10:13 +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 1f5efcec17b18e634fddc9a051d9b38bb0836808..d9c03dbbcdf7778b6b23bf32d812554287c9b180 100644 (file)
@@ -12,6 +12,9 @@ IF(APPLE)
   LINK_DIRECTORIES(/opt/local/lib)
 ENDIF()
 
+FIND_PATH(ubox_include_dir libubox/ustream-ssl.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 ADD_LIBRARY(uclient SHARED uclient.c uclient-http.c uclient-utils.c)
 TARGET_LINK_LIBRARIES(uclient ubox dl)