cmake: Find libubox/uloop.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 2 Jul 2016 00:05:17 +0000 (17:05 -0700)
committerFelix Fietkau <nbd@nbd.name>
Thu, 1 Dec 2016 10:28:47 +0000 (11:28 +0100)
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>
CMakeLists.txt

index 34a21d07f918254908909d692cad4fb99bcf7340..8c338f38c5d2844b49f5c7ae80af0aab34b714ea 100644 (file)
@@ -7,6 +7,8 @@ project(odhcpd C)
 set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99")
 
+FIND_PATH(ubox_include_dir libubox/uloop.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
 
 add_definitions(-D_GNU_SOURCE -Wall -Werror -Wextra)