build: various improvements
- add option to install only host tools - add option to specify lib and runtime dir Type: improvement Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
13f64ce227
commit
599efc67e8
@ -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)
|
||||
|
@ -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()
|
||||
|
||||
|
@ -34,7 +34,7 @@ macro(add_vpp_library lib)
|
||||
endif()
|
||||
install(
|
||||
TARGETS ${lib}
|
||||
DESTINATION lib
|
||||
DESTINATION ${VPP_LIBRARY_DIR}
|
||||
COMPONENT ${ARG_COMPONENT}
|
||||
)
|
||||
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user