From patchwork Tue Oct 5 16:54:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1536795 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=wYw8cTdJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HP3dz4sw7z9sPf for ; Wed, 6 Oct 2021 03:56:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:List-Help: Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From:List-Post:List-Id: Message-ID:MIME-Version:Date:Subject:To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OhsJOGj+JnzyAo6EQXKbUU6qU5AuoJHR+y3E478Jr9c=; b=wYw8cTdJ7XT1ZgAmMbTEc+8I62 X2wDZmCK8zBQEaHgbOg3QsQrijZvenDJKNJO2wYTIxXVU4NAAiBd23hcBi51Jao1lRQXpThmbqEm0 UzEMIQutDrQxi3ez1DHh0wHzbQKbvLmIRrf0iz+RQdbXpvmcR8EKnk5LjIcm11t9BVJcswtX1TX7n vxOeLNaAlHk8dzHKnGmmMDNu4b6ucVRb+GzuhXSdE0Yb0cd2rk38Jse2Kc2d/X+NvtsN7+xCjsrxJ HIjKw3a+y9xPnmISIouMXtVgpLKlyzDF9wt+9co71WOBPOuPjKDYO85UhA7whYRrjEmt4b8tqOupM 8IB9045Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXniQ-00BL8J-8J; Tue, 05 Oct 2021 16:54:54 +0000 To: Subject: [PATCH uci v2] cmake: Allow override of install directories Date: Tue, 5 Oct 2021 18:54:39 +0200 MIME-Version: 1.0 Message-ID: List-Id: OpenWrt Development List List-Post: X-Patchwork-Original-From: Hauke Mehrtens via openwrt-devel From: Hauke Mehrtens Precedence: list X-Mailman-Version: 2.1.34 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Hauke Mehrtens List-Help: Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Use the GNUInstallDirs include to allow callers to override the install directories. This is helpful when building uci in build systems like Yocto which prefer to use /usr/lib64 for the 64 bit libraries. Signed-off-by: Hauke Mehrtens --- Change since: v1: overwrite -> override CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 560ed65..50e7f51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.6) +INCLUDE(GNUInstallDirs) PROJECT(uci C) @@ -74,12 +75,12 @@ IF(UNIT_TESTING) ENDIF() INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) INSTALL(TARGETS uci cli - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )