From: Florian Fainelli Date: Sun, 18 Jun 2017 19:45:30 +0000 (-0700) Subject: cgi-io: Find and search for libubus.h X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7b1588384291ef5f19145010bd0f33e15d221c79;p=project%2Fcgi-io.git cgi-io: Find and search for libubus.h Fixes build errors with external toolchains: [ 33%] Building C object CMakeFiles/cgi-io.dir/main.c.o /home/florian/dev/openwrt/trunk/build_dir/target-mipsel-unknown-linux-gnu_glibc/cgi-io/main.c:30:21: fatal error: libubus.h: No such file or directory #include ^ compilation terminated. Signed-off-by: Florian Fainelli --- diff --git a/Makefile b/Makefile index c36231a..3032ca4 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cgi-io -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0+ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a4ca19..6d8b158 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,9 @@ PROJECT(cgi-io C) INCLUDE(CheckFunctionExists) +FIND_PATH(ubus_include_dir libubus.h) +INCLUDE_DIRECTORIES(${ubus_include_dir}) + ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")