Cmake: Find libubox/list.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 12 Feb 2017 22:03:33 +0000 (14:03 -0800)
committerSteven Barth <steven@midlink.org>
Wed, 15 Feb 2017 00:48:48 +0000 (01:48 +0100)
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/list.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 00d6b14c635772716f48748543b7672cad99065e..20fb03d505c83b94b61305f2056c99988dd4e9a2 100644 (file)
@@ -11,6 +11,9 @@ if(${L_LEVEL})
   add_definitions(-DL_LEVEL=${L_LEVEL})
 endif(${L_LEVEL})
 
+FIND_PATH(ubox_include_dir libubox/list.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 if(WITH_LIBUBOX)
   add_definitions(-Wextra)
   set(PLATFORM_LINK ${PLATFORM_LINK} ubox)