Browse Source

cmake: Find libubox/list.h header file

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>
Florian Fainelli 8 years ago
parent
commit
101870cbc2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      CMakeLists.txt

+ 3 - 0
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)