summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-07-11 14:01:15 -0700
committerFelix Fietkau <nbd@nbd.name>2016-07-27 17:27:43 +0200
commit59e0c739634f46a164d939e54416287b91ff8a9b (patch)
treef5d66220200c0f6f1487f5488289b3018bfc09cf
parent9d9f07142bbef1c63a79620967a847a9493105e5 (diff)
cmake: Find libubox/usock.h
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for libubox/usock.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>
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8514351..7ae8ba4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,9 @@ IF(LIBS STREQUAL "LIBS-NOTFOUND")
SET(LIBS "")
ENDIF()
+FIND_PATH(ubox_include_dir libubox/usock.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
SET(SOURCES main.c listen.c client.c utils.c file.c auth.c cgi.c relay.c proc.c plugin.c handler.c)
IF(TLS_SUPPORT)
SET(SOURCES ${SOURCES} tls.c)