upgraded: cmake: Find and include uloop.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 31 May 2017 21:00:34 +0000 (14:00 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Tue, 13 Jun 2017 23:52:09 +0000 (16:52 -0700)
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 00d8ce575c25d2363e23505c5af77e91931c375f..fd7d6bb58b784d39b5386301efe0c99b1642c072 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)
 ADD_EXECUTABLE(upgraded upgraded.c ../watchdog.c)
 TARGET_LINK_LIBRARIES(upgraded ubox)