aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/VPPConfig.cmake4
-rw-r--r--src/cmake/exec.cmake2
-rw-r--r--src/cmake/library.cmake2
-rw-r--r--src/cmake/plugin.cmake4
4 files changed, 7 insertions, 5 deletions
diff --git a/src/cmake/VPPConfig.cmake b/src/cmake/VPPConfig.cmake
index 870c2a5b182..21da59d68ba 100644
--- a/src/cmake/VPPConfig.cmake
+++ b/src/cmake/VPPConfig.cmake
@@ -33,7 +33,9 @@ if (compiler_flag_no_address_of_packed_member)
add_definitions(-Wno-address-of-packed-member)
endif()
-include(CheckCCompilerFlag)
+set(VPP_RUNTIME_DIR "bin" CACHE STRING "Relative runtime directory path")
+set(VPP_LIBRARY_DIR "lib" CACHE STRING "Relative library directory path")
+
include(${CMAKE_CURRENT_LIST_DIR}/cpu.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/api.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/library.cmake)
diff --git a/src/cmake/exec.cmake b/src/cmake/exec.cmake
index d5e837084e9..7bfd5751c83 100644
--- a/src/cmake/exec.cmake
+++ b/src/cmake/exec.cmake
@@ -30,7 +30,7 @@ macro(add_vpp_executable exec)
add_dependencies(${exec} ${ARG_DEPENDS})
endif()
if(NOT ARG_NO_INSTALL)
- install(TARGETS ${exec} DESTINATION bin)
+ install(TARGETS ${exec} DESTINATION ${VPP_RUNTIME_DIR})
endif()
endmacro()
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index dc14ae59e46..d6a63d325e9 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -34,7 +34,7 @@ macro(add_vpp_library lib)
endif()
install(
TARGETS ${lib}
- DESTINATION lib
+ DESTINATION ${VPP_LIBRARY_DIR}
COMPONENT ${ARG_COMPONENT}
)
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 2e2749a440e..bf40aa504a7 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -86,13 +86,13 @@ macro(add_vpp_plugin name)
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_api_test_plugins)
install(
TARGETS ${test_plugin_name}
- DESTINATION lib/vpp_api_test_plugins
+ DESTINATION ${VPP_LIBRARY_DIR}/vpp_api_test_plugins
COMPONENT ${PLUGIN_COMPONENT}
)
endif()
install(
TARGETS ${plugin_name}
- DESTINATION lib/vpp_plugins
+ DESTINATION ${VPP_LIBRARY_DIR}/vpp_plugins
COMPONENT ${PLUGIN_COMPONENT}
)
endmacro()