aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/CMakeLists.txt
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-07-18 10:13:49 +0200
committerMauro Sardara <msardara@cisco.com>2019-07-18 10:45:08 +0200
commit64442da40c3e390649d42e3e97a74986bba27afd (patch)
tree35e265c654c01822bc398ed16b8108509d9a28c0 /hicn-plugin/CMakeLists.txt
parent87cd4b4d22a08f1b56cd067770a29bcb05ebb845 (diff)
[HICN-248] Install libraries under correct folder (lib/x86_64-linux-gnu on ubuntu/debian and lib64 on centos)
Change-Id: I9c8fc206f2f93b9eae1060387ab6d0833da80124 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-plugin/CMakeLists.txt')
-rw-r--r--hicn-plugin/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/hicn-plugin/CMakeLists.txt b/hicn-plugin/CMakeLists.txt
index be71b36a3..8c859cdd9 100644
--- a/hicn-plugin/CMakeLists.txt
+++ b/hicn-plugin/CMakeLists.txt
@@ -14,6 +14,8 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(hicn-plugin)
+include(GNUInstallDirs)
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules/"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/"
@@ -195,7 +197,7 @@ if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE "Release")
endif (NOT CMAKE_BUILD_TYPE)
-SET(HICN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/lib CACHE STRING "hicn_install_prefix")
+SET(HICN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} CACHE STRING "hicn_install_prefix")
if (CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -march=native -O3 -g")
@@ -274,9 +276,9 @@ install(TARGETS hicn_api_test_plugin
COMPONENT ${HICN_PLUGIN})
install(FILES ${HICN_API_TEST_HEADER_FILES} ${HICN_API_GENERATED_FILES}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/vpp_plugins/hicn
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/vpp_plugins/hicn
COMPONENT ${HICN_PLUGIN})
install(FILES ${HICN_VAPI_GENERATED_FILES}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/vapi
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/vapi
COMPONENT ${HICN_PLUGIN})