cmake: Find libubox/blobmsg_json.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 3 Dec 2016 17:34:44 +0000 (09:34 -0800)
committerJohn Crispin <john@phrozen.org>
Sun, 11 Dec 2016 08:16:30 +0000 (09:16 +0100)
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for blobmsg_json.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 49aa4176fbc75b413987c1dcee3e2ad272a8e2dd..ceb472e941620558fac586eb032a6930e7f61034 100644 (file)
@@ -31,6 +31,9 @@ ENDIF()
 FIND_PATH(ubus_include_dir libubus.h)
 INCLUDE_DIRECTORIES(${ubus_include_dir})
 
+FIND_PATH(ubox_include_dir libubox/blobmsg_json.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 ADD_EXECUTABLE(rpcd main.c exec.c session.c uci.c plugin.c)
 TARGET_LINK_LIBRARIES(rpcd ubox ubus uci dl blobmsg_json ${json} ${crypt})