diff options
author | Bachtin, Dmitri <dbachtin@init-ka.de> | 2015-11-20 07:34:35 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-22 12:37:10 +0100 |
commit | 23337736a43845ff5b24b7ab8556572d703cd294 (patch) | |
tree | ca93c9a7558bbae261770f4a7d486d74c7151eff | |
parent | 22a64fe3e9a7b5dcf97d0b240f2ce09919f4b02f (diff) |
uqmi: search for ubox, blobmsg_json and json include paths
CMake will search for include paths via FIND_PATH() of the following
libraries: libubox, blobmsg_json and json. This allows to build uqmi
when the dependencies are in non-standard locations by specifying
respective _include_dir variables.
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a11544..96ebd47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") SET(SOURCES main.c dev.c commands.c qmi-message.c) +FIND_PATH(ubox_include_dir libubox/usock.h) +FIND_PATH(blobmsg_json_include_dir libubox/blobmsg_json.h) +FIND_PATH(json_include_dir json-c/json.h json/json.h json.h) +INCLUDE_DIRECTORIES(${ubox_include_dir} ${blobmsg_json_include_dir} ${json_include_dir}) + IF(BUILD_STATIC) FIND_LIBRARY(json NAMES libjson.a libjson-c.a) FIND_LIBRARY(blobmsg_json NAMES libblobmsg_json.a) |