From f4089654a399fbea6b8fd25844fbb43d259e0332 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 11 Jul 2016 14:03:49 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60959d5..49aa417 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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})