cmake: Find libubus.h

Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for libubus.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>
This commit is contained in:
Florian Fainelli 2016-07-11 14:03:49 -07:00 committed by Felix Fietkau
parent 23417e94d2
commit f4089654a3

View file

@ -28,6 +28,9 @@ IF(crypt STREQUAL "crypt-NOTFOUND")
SET(crypt "")
ENDIF()
FIND_PATH(ubus_include_dir libubus.h)
INCLUDE_DIRECTORIES(${ubus_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})