summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-07-11 14:03:49 -0700
committerFelix Fietkau <nbd@nbd.name>2016-07-27 17:28:46 +0200
commitf4089654a399fbea6b8fd25844fbb43d259e0332 (patch)
treecf3f0b9478efffdf79d1ca865fc215f84508c55e
parent23417e94d25570e6d62542bac46edd51e8e0243a (diff)
downloadrpcd-f4089654a399fbea6b8fd25844fbb43d259e0332.tar.gz
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>
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
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})