upgraded: cmake: Find and include uloop.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 31 May 2017 21:00:34 +0000 (14:00 -0700)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 20 Jun 2017 14:48:43 +0000 (16:48 +0200)
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/uloop.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>
upgraded/CMakeLists.txt

index 093dba2f2f92c89750757d53f641ab3bbdd63386..dd3f743be47faebb5b9b1e51dea071a2ed475fb0 100644 (file)
@@ -1,6 +1,8 @@
 cmake_minimum_required(VERSION 2.6)
 
 PROJECT(upgraded C)
+FIND_PATH(ubox_include_dir libubox/uloop.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
 ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
 set(CMAKE_EXE_LINKER_FLAGS "-static -fPIC")
 set(CMAKE_FIND_LIBRARY_SUFFIXES .a)