cmake: Find uci header file
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 1 Jul 2016 23:05:23 +0000 (16:05 -0700)
committerJohn Crispin <john@phrozen.org>
Fri, 1 Jul 2016 13:19:37 +0000 (15:19 +0200)
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@gmail.com>
CMakeLists.txt

index 73e875348b554783983516e84769707f70240ab0..6cf0c934aac6b8edc3ca90ad4c5bac7a5374d831 100644 (file)
@@ -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