[LEDE-DEV] [PATCH jsonpath] cmake: Find libubox/list.h header file

Florian Fainelli f.fainelli at gmail.com
Fri Jul 1 16:06:16 PDT 2016


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 at gmail.com>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8db786e94922..0301db5655b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,9 @@ ADD_CUSTOM_COMMAND(
   COMMENT "Generating parser.c"
 )
 
+FIND_PATH(ubox_include_dir libubox/list.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 SET_PROPERTY(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "lemon;parser.h;parser.out")
 SET_SOURCE_FILES_PROPERTIES("parser.c" PROPERTIES GENERATED TRUE)
 ADD_EXECUTABLE(jsonpath main.c ast.c lexer.c parser.c matcher.c)
-- 
2.7.4




More information about the Lede-dev mailing list