From: Florian Fainelli Date: Fri, 1 Jul 2016 23:06:16 +0000 (-0700) Subject: cmake: Find libubox/list.h header file X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=101870cbc23e6373161958132f83a9968d4a0c53;p=project%2Fjsonpath.git 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8db786e..0301db5 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)