summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-07-11 15:34:36 -0700
committerFelix Fietkau <nbd@nbd.name>2016-07-19 14:22:28 +0200
commit2769852e76b547f6e9b56f769f2a0056d47df7a4 (patch)
tree7be523d3be5e8ca415bf32800385ae841ea653de
parent8a47c4b6649f8437bb60300471400d558426612e (diff)
cmake: Find libubox/blobmsg_json.h
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for libubox/blobmsg_json.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 260cfbe..95d757f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 2.6)
PROJECT(usbmode C)
ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
+FIND_PATH(ubox_include_dir libubox/blobmsg_json.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(SOURCES main.c switch.c)