From patchwork Fri Oct 1 14:19:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1535349 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=bRmWk7O9; 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 4HLXRC2w1vz9sf8 for ; Sat, 2 Oct 2021 00:23:50 +1000 (AEST) 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=cSWGpWodlIXXrJdLIzrfbZvtI2BJ3K3BjniNsIulZOg=; b=bRmWk7O9V/bt7Ld/F/KdqO2wWf L62vG/ouiZLWXnabulhLBFmducQ7RSnxgOBu89i+B8kSicQxtb5rnldsJjbz+r3Lx025wqhXjr4we lvWixTaOJg2IlBtdmtvXG9QHPXj6YmMrSYFptw6BG0QEJfDwCab8ri4nksGspF2dL0PYLaqkgwEWE lwsls0BS9EvQFHg7JBuxK6HmU1P1qve/M3tIAhhlZVN0eI2WIfoNTrKvTZ1cWX/+OhW9/Cx/sYg3w gXJUH0uGdID7awMVl35/3cV+KFx6a9rhYipwZx40Pm6iH13NeHlfabYl5bFJBdIi5FY0qhlpn1RH+ gVHoDd1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWJPW-000WMs-51; Fri, 01 Oct 2021 14:21:14 +0000 To: Subject: [PATCH uci] cmake: Allow overwrite of install directories Date: Fri, 1 Oct 2021 16:19:04 +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 overwrite 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 --- 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} )