diff mbox series

[uci] cmake: Allow overwrite of install directories

Message ID mailman.2550.1633098072.1923571.openwrt-devel@lists.openwrt.org
State Superseded
Delegated to: Hauke Mehrtens
Headers show
Series [uci] cmake: Allow overwrite of install directories | expand

Commit Message

Hauke Mehrtens Oct. 1, 2021, 2:19 p.m. UTC
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 <hmehrtens@maxlinear.com>
---
 CMakeLists.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Paul D Oct. 2, 2021, 12:41 p.m. UTC | #1
Overwrite or override? Seems like override - distinction here is 
important...
Hauke Mehrtens Oct. 5, 2021, 3:03 p.m. UTC | #2
On 10/2/21 2:41 PM, Paul D wrote:
> Overwrite or override? Seems like override - distinction here is 
> important...
> 

Hi,

I can change this to override, I am not a native speaker.

Hauke
diff mbox series

Patch

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}
 )