From 136006b88826feff4f0a36ffab511d1366483cf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Sun, 20 Feb 2022 10:41:53 +0100 Subject: [PATCH] cmake: fix usage of implicit library and include paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit And thus allow building in out of tree setups etc. Signed-off-by: Petr Å tetiar --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb5133..b3bf411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,8 +24,16 @@ SET(SOURCES extdev.c bonding.c) -SET(LIBS - ubox ubus uci json-c blobmsg_json) +FIND_LIBRARY(uci NAMES uci) +FIND_LIBRARY(ubox NAMES ubox) +FIND_LIBRARY(ubus NAMES ubus) +FIND_LIBRARY(json NAMES json-c json) +FIND_LIBRARY(blobmsg_json NAMES blobmsg_json) + +SET(LIBS ${ubox} ${ubus} ${uci} ${json} ${blobmsg_json}) + +FIND_PATH(ubox_include_dir libubox/usock.h) +INCLUDE_DIRECTORIES(${ubox_include_dir}) IF (NOT DEFINED LIBNL_LIBS) include(FindPkgConfig) -- 2.30.2