[LEDE-DEV] [PATCH] cmake: Find uci header file

Florian Fainelli f.fainelli at gmail.com
Fri Jul 1 16:05:23 PDT 2016


Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for uci.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 73e875348b55..6cf0c934aac6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,9 @@ INSTALL(TARGETS validate
 	LIBRARY DESTINATION lib
 )
 
+FIND_PATH(uci_include_dir uci.h)
+INCLUDE_DIRECTORIES(${uci_include_dir})
+
 ADD_EXECUTABLE(validate_data validate/cli.c)
 TARGET_LINK_LIBRARIES(validate_data ubox uci validate)
 INSTALL(TARGETS validate_data
-- 
2.7.4




More information about the Lede-dev mailing list