diff options
author | Hauke Mehrtens <hmehrtens@maxlinear.com> | 2021-10-05 18:54:39 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2021-10-22 22:58:18 +0200 |
commit | f84f49f00fb70364f58b4cce72f1796a7190d370 (patch) | |
tree | cea1fc66efd48d27a65f3e482ed1cda38c55d68d | |
parent | 4b3db1179747b6a6779029407984bacef851325c (diff) | |
download | uci-f84f49f00fb70364f58b4cce72f1796a7190d370.tar.gz |
cmake: Allow override of install directories
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 <hmehrtens@maxlinear.com>
-rw-r--r-- | CMakeLists.txt | 9 |
1 files 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} ) |