[LEDE-DEV] [PATCH fstools 1/2] cmake: Find libubox/ulog.h

Florian Fainelli f.fainelli at gmail.com
Fri Jul 1 16:06:41 PDT 2016


Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/ulog.h.  Some external toolchains which do not include standard
locations would fail to find the header otherwise.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6002e5fe9e0..9a5a583c46bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,9 @@ ADD_LIBRARY(ubi-utils STATIC
 		libubi/ubiutils-common.c)
 INSTALL(TARGETS ubi-utils ARCHIVE DESTINATION lib)
 
+FIND_PATH(ubox_include_dir libubox/ulog.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
 SET_TARGET_PROPERTIES(ubi-utils PROPERTIES COMPILE_FLAGS
 		"-ffunction-sections -fdata-sections")
 
-- 
2.7.4




More information about the Lede-dev mailing list