From 46063a1657c449d46c1ed7384862f2c0aa051761 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 11 Jul 2016 15:02:13 -0700 Subject: [PATCH] cmake: Find uci.h Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for uci.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 2e712cd..b37d26c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 2.6) PROJECT(mountd C) ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations) +FIND_PATH(ubus_include_dir libubus.h) +INCLUDE_DIRECTORIES(${ubus_include_dir}) + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") ADD_EXECUTABLE(mountd main.c log.c sys.c autofs.c mount.c timer.c signal.c ucix.c led.c fs.c ucix.c) -- 2.25.1