aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/vat/CMakeLists.txt2
-rw-r--r--src/vat2/CMakeLists.txt2
-rw-r--r--src/vlib/CMakeLists.txt2
-rw-r--r--src/vlibapi/CMakeLists.txt2
-rw-r--r--src/vpp-api/vapi/CMakeLists.txt2
-rw-r--r--src/vpp/CMakeLists.txt6
-rw-r--r--src/vppinfra/CMakeLists.txt2
8 files changed, 12 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 49ea0373eb4..a957d864fad 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,6 +35,7 @@ endif()
include(CheckCCompilerFlag)
include(CheckIPOSupported)
+include(GNUInstallDirs)
include(cmake/misc.cmake)
include(cmake/cpu.cmake)
include(cmake/ccache.cmake)
@@ -67,8 +68,8 @@ set(CMAKE_C_COMPILER_TARGET ${CMAKE_SYSTEM_PROCESSOR}-linux-gnu)
##############################################################################
check_c_compiler_flag("-Wno-address-of-packed-member"
compiler_flag_no_address_of_packed_member)
-set(VPP_RUNTIME_DIR "bin" CACHE STRING "Relative runtime directory path")
-set(VPP_LIBRARY_DIR "lib" CACHE STRING "Relative library directory path")
+set(VPP_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR} CACHE STRING "Relative runtime directory path")
+set(VPP_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING "Relative library directory path")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${VPP_RUNTIME_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${VPP_LIBRARY_DIR})
diff --git a/src/vat/CMakeLists.txt b/src/vat/CMakeLists.txt
index ee53386f114..66ea69b8da4 100644
--- a/src/vat/CMakeLists.txt
+++ b/src/vat/CMakeLists.txt
@@ -58,7 +58,7 @@ add_vpp_executable(vpp_json_test ENABLE_EXPORTS NO_INSTALL
##############################################################################
install(
FILES vat.h json_format.h
- DESTINATION include/vat
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vat
COMPONENT vpp-dev
)
diff --git a/src/vat2/CMakeLists.txt b/src/vat2/CMakeLists.txt
index 2afb95e6920..9ee2d8211eb 100644
--- a/src/vat2/CMakeLists.txt
+++ b/src/vat2/CMakeLists.txt
@@ -98,6 +98,6 @@ install(
FILES
jsonconvert.h
vat2_helpers.h
- DESTINATION include/vat2
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vat2
COMPONENT vpp-dev
)
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index c8127fbe337..df51b2e99eb 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -41,7 +41,7 @@ configure_file(
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
- DESTINATION include/vlib
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vlib
COMPONENT vpp-dev
)
diff --git a/src/vlibapi/CMakeLists.txt b/src/vlibapi/CMakeLists.txt
index dfd6b5b5045..e6937a6db01 100644
--- a/src/vlibapi/CMakeLists.txt
+++ b/src/vlibapi/CMakeLists.txt
@@ -20,7 +20,7 @@ install(
api_types.h
DESTINATION
- include/vlibapi
+ ${CMAKE_INSTALL_INCLUDEDIR}/vlibapi
COMPONENT vpp-dev
)
diff --git a/src/vpp-api/vapi/CMakeLists.txt b/src/vpp-api/vapi/CMakeLists.txt
index 53034bd27b8..df5d6114333 100644
--- a/src/vpp-api/vapi/CMakeLists.txt
+++ b/src/vpp-api/vapi/CMakeLists.txt
@@ -34,7 +34,7 @@ install(
vapi.hpp
vapi_internal.h
DESTINATION
- include/vapi
+ ${CMAKE_INSTALL_INCLUDEDIR}/vapi
COMPONENT
vpp-dev
)
diff --git a/src/vpp/CMakeLists.txt b/src/vpp/CMakeLists.txt
index 3b466599ffa..e15037cccb7 100644
--- a/src/vpp/CMakeLists.txt
+++ b/src/vpp/CMakeLists.txt
@@ -51,7 +51,7 @@ foreach(file ${VPP_API_FILES})
FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.h
${CMAKE_CURRENT_BINARY_DIR}/${file}_enum.h
${CMAKE_CURRENT_BINARY_DIR}/${file}_types.h
- DESTINATION include/vpp/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vpp/${dir}
COMPONENT vpp-dev
)
endforeach()
@@ -133,8 +133,8 @@ add_vpp_library(vppmem_preload
LINK_LIBRARIES vppinfra
)
-install(FILES conf/startup.conf DESTINATION etc/vpp COMPONENT vpp)
-install(FILES conf/80-vpp.conf DESTINATION etc/sysctl.d COMPONENT vpp)
+install(FILES conf/startup.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vpp COMPONENT vpp)
+install(FILES conf/80-vpp.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sysctl.d COMPONENT vpp)
##############################################################################
# VAT2 plugins
diff --git a/src/vppinfra/CMakeLists.txt b/src/vppinfra/CMakeLists.txt
index 8114ea19ea4..4be291e1e8d 100644
--- a/src/vppinfra/CMakeLists.txt
+++ b/src/vppinfra/CMakeLists.txt
@@ -32,7 +32,7 @@ configure_file(
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
- DESTINATION include/vppinfra
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vppinfra
COMPONENT vpp-dev
)