From patchwork Wed Oct 21 03:08:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 1385303 X-Patchwork-Delegate: yszhou4tech@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Xru4NM9Q; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DwXses+p; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CGFr21LVtz9sTD for ; Wed, 21 Oct 2020 14:10:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S7ExNDPRshykegB2wvhSmR0KjCHS1OW4PIqKAiw/Q1E=; b=Xru4NM9QnrqINS0wgPRPGKJSP f6CKOv5mM37cwjSTuqs9q2sslExhD74m+VnhOFUHo4H8Xjdu4ziLxq12eHtvg6Toh5qkK2A2v3/T6 D4FKTweY4eq2aKRAApDfKVVed3cCn666KFowamc6BUMvWV7dmNyf2rgk0ev+Qt4FGYqoH0PTz9vI1 LhMj1oIksjw1twSl3ij3acSQIv9SxKfjEGLsvMgdhRkHjdeHbtnx2WkmWIEZyQmnsMh9hJdqD5uEO RVJdLgXpzsX8pg6EC3NIjxfCXVmFx6stuNc7d/vxeKX1GgxS3LoSYUMmrig6oholGD1lop98U2R+D kUgbN62vg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kV4Ua-0006l2-Qs; Wed, 21 Oct 2020 03:08:48 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kV4UY-0006k2-7o for openwrt-devel@lists.openwrt.org; Wed, 21 Oct 2020 03:08:46 +0000 Received: by mail-pj1-x1041.google.com with SMTP id l2so387141pjt.5 for ; Tue, 20 Oct 2020 20:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rmWMVDbDFgySVhBdfHacmMHse99Y2csT7LAiJhl9s6s=; b=DwXses+pcY0Z9HuGrHsbjGHoi+5hSw9RsEbJI7/grSVa0aC9Pv6cDjrPaCbYe/rZ/c KFTQeEh+RD+zyCHNZGzy9/KeZySKPliydw70eGzgMbcFM3xEOYHVwDJxjuSRRSY/1VT0 vFXmCNt8R2DKPfeNJqjPbuqWrpUaP5dNUoqx1pmreQp+YoZjY7bmX8EaUj/UYvRSInXq naE/pKdoSHVWLhPVgImBFNToYu1N5ZTAecLWRhZZY8jAqP+sPYZfFZnKmdptgokwxquU w2w2UmyA/9RE1a2zWa//zlZdGfOiqMF0EgCa3dYIKB11KUTkBsqmpHse6PKc7Wa2TsNz aQ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rmWMVDbDFgySVhBdfHacmMHse99Y2csT7LAiJhl9s6s=; b=AuwG8olRQqjSXmUkQAQv88Z6a7z5xBS+4i50x/M3Idy/tNukNyLI9UehTrjxWFtpne emJFr1l6hg9nsmqQlagCq6187dTBYHehnxkWBWChZyrZsL4glBSS3uwMkiRxesCG4GIO 1u5+2rUNbbeRtHIkZp1lwuN1/G9lugoX4uyd5kuXVmAUoGu8L0VJHme3zkUvzGJxOWxD 7qtZzBZoCrgaW2JeucL/NeT4NUqOuZedXRyF1sMjOtuOa53H2J/qrPtK56Ms+Nd2YWHf uSSVPetG47aTIEuGc7pBXaLe/FCCc+bipgYmFqoR6H3JFDdiGbpjkMr1jI7Xz0Rf26by cbGQ== X-Gm-Message-State: AOAM533PbWmQrFRIuyk6l/2cvBOl267C334jqfhveLNUzVkhydvwVR2q ytTPp22GpbGGLOeH0uGncfE= X-Google-Smtp-Source: ABdhPJzBGPq2ABRrYV7pXwIJYCxM0I2LnU4SgkHESAMTlmakF7IN+nB1WKZvweg5wrhPcm+YZN7w8Q== X-Received: by 2002:a17:90a:ec11:: with SMTP id l17mr1140953pjy.104.1603249724337; Tue, 20 Oct 2020 20:08:44 -0700 (PDT) Received: from titan.office.yunion.io ([103.119.177.162]) by smtp.gmail.com with ESMTPSA id f7sm376393pfd.111.2020.10.20.20.08.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2020 20:08:43 -0700 (PDT) From: Yousong Zhou To: Felix Fietkau , Hans Dedecker Subject: [PATCH netifd 1/4] build: find and use libnl header dirs Date: Wed, 21 Oct 2020 11:08:22 +0800 Message-Id: <20201021030825.93626-2-yszhou4tech@gmail.com> In-Reply-To: <20201021030825.93626-1-yszhou4tech@gmail.com> References: <20201021030825.93626-1-yszhou4tech@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201020_230846_285154_D06C9195 X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1041 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [yszhou4tech[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yousong Zhou , openwrt-devel@lists.openwrt.org Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Name of the libnl .pc file is libnl-3.0.pc This commit is mainly for testing netifd build of usual Linux systems. netifd Makefile in current OpenWrt build system specifies custom cmake flags to point to libnl-tiny Signed-off-by: Yousong Zhou --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6203aa..9d19817 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,12 @@ SET(LIBS ubox ubus uci json-c blobmsg_json) IF (NOT DEFINED LIBNL_LIBS) - FIND_LIBRARY(libnl NAMES libnl-3 libnl nl-3 nl) - SET(LIBNL_LIBS ${libnl}) + include(FindPkgConfig) + pkg_search_module(LIBNL libnl-3.0 libnl-3 libnl nl-3 nl) + IF (LIBNL_FOUND) + include_directories(${LIBNL_INCLUDE_DIRS}) + SET(LIBNL_LIBS ${LIBNL_LIBRARIES}) + ENDIF() ENDIF() IF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND NOT DUMMY_MODE)