From patchwork Mon Apr 27 20:13:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 465211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 081DF140083 for ; Tue, 28 Apr 2015 06:14:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=googlemail.com header.i=@googlemail.com header.b=gGmZbfqG; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A68C2286F45; Mon, 27 Apr 2015 22:13:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8E398280192 for ; Mon, 27 Apr 2015 22:12:55 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .googlemail. - helo: .mail-wg0-f46.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 27 Apr 2015 22:12:54 +0200 (CEST) Received: by wgin8 with SMTP id n8so128311102wgi.0 for ; Mon, 27 Apr 2015 13:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=tTNEi+dD1iMFexuHrgY0NjZHCE0LKjq1k2FAbU5wgpw=; b=gGmZbfqGCIV3jW6LolK00SKGTXOaZbcZVGhI5nM7NXVMLRPW9xUlnEOVaLPI1vgVvU AsJIBFXopno/V1zN+a8BLGLY5lXK1Pbq2GHnu8ETvL5TlmcImRUtZ5P0kKo5SxwPw3s2 Ic+21cWb2gn0r648EaWBPwkM3r3a8gGxZmP67f8XSBjEmz4mMF84dx/MeGMmdCzviaYb 9TsfvpiCn0dEsGVXUaOGu4qcEuLOU/JAUKhorXw4ma/at2vy9gPs+VcVPpKfqaqJtDIY ZAcUITVy+BlWp2DDQeK5+WBlXnfspNne51JJfuB8F2NbgCYKICRv1tKdOrPmVVRPqAhQ ljwg== X-Received: by 10.180.76.8 with SMTP id g8mr389449wiw.79.1430165636916; Mon, 27 Apr 2015 13:13:56 -0700 (PDT) Received: from user-SATELLITE-L50-B.localdomain (x2f0203c.dyn.telefonica.de. [2.240.32.60]) by mx.google.com with ESMTPSA id em18sm7178835wjd.19.2015.04.27.13.13.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Apr 2015 13:13:55 -0700 (PDT) From: Yegor Yefremov To: openwrt-devel@lists.openwrt.org Date: Mon, 27 Apr 2015 22:13:42 +0200 Message-Id: <1430165622-26787-1-git-send-email-yegorslists@googlemail.com> X-Mailer: git-send-email 2.1.0 Subject: [OpenWrt-Devel] [PATCH] ubox: CMake: fix json-c detection X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Use PKG_SEARCH_MODULE() to detect json-c library, otherwise the search fails, if both json-c and json are not present in pkg-config database. Signed-off-by: Yegor Yefremov --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8e8945..b2c062b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ IF(APPLE) ENDIF() INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(JSONC json-c json) +PKG_SEARCH_MODULE(JSONC json-c json) IF(JSONC_FOUND) ADD_DEFINITIONS(-DJSONC) INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})