cmake: Find libubox/uloop.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 1 Jul 2016 23:05:52 +0000 (16:05 -0700)
committerJohn Crispin <john@phrozen.org>
Fri, 1 Jul 2016 13:21:17 +0000 (15:21 +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>
CMakeLists.txt

index 74959e02951d286efda4c361eb1cbe7cba38e668..b66fad16600fb2404ff5e97c8a3dd04cc3d80e35 100644 (file)
@@ -50,6 +50,9 @@ INSTALL(TARGETS procd
        RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
 )
 
+FIND_PATH(ubox_include_dir libubox/uloop.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 IF(DISABLE_INIT)
 ADD_DEFINITIONS(-DDISABLE_INIT)
 ELSE()