diff options
Diffstat (limited to 'src/cmake')
-rw-r--r-- | src/cmake/cpu.cmake | 4 | ||||
-rw-r--r-- | src/cmake/library.cmake | 2 | ||||
-rw-r--r-- | src/cmake/plugin.cmake | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake index e0311cea2ee..9a0dfdd5bcb 100644 --- a/src/cmake/cpu.cmake +++ b/src/cmake/cpu.cmake @@ -16,6 +16,7 @@ ############################################################################## if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") set(CMAKE_C_FLAGS "-march=corei7 -mtune=corei7-avx ${CMAKE_C_FLAGS}") + set(VPP_LIB_DIR_NAME lib64) check_c_compiler_flag("-march=core-avx2" AVX2) if(AVX2) list(APPEND MARCH_VARIANTS "avx2\;-march=core-avx2 -mtune=core-avx2") @@ -26,6 +27,9 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") endif() elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") set(CMAKE_C_FLAGS "-march=armv8-a+crc ${CMAKE_C_FLAGS}") + set(VPP_LIB_DIR_NAME lib64) +else() + set(VPP_LIB_DIR_NAME lib) endif() macro(vpp_library_set_multiarch_sources lib) diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index 08831ed9cf8..6aa0ae848f9 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -26,7 +26,7 @@ macro(add_vpp_library lib) target_link_libraries(${lib} ${ARG_LINK_LIBRARIES}) endif() # install .so - install(TARGETS ${lib} DESTINATION lib) + install(TARGETS ${lib} DESTINATION ${VPP_LIB_DIR_NAME}) if(ARG_MULTIARCH_SOURCES) vpp_library_set_multiarch_sources(${lib} ${ARG_MULTIARCH_SOURCES}) diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake index e9397a7fa85..4087325b0d6 100644 --- a/src/cmake/plugin.cmake +++ b/src/cmake/plugin.cmake @@ -45,9 +45,9 @@ macro(add_vpp_plugin name) set_target_properties(${test_plugin_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_api_test_plugins) - install(TARGETS ${test_plugin_name} DESTINATION lib/vpp_api_test_plugins COMPONENT + install(TARGETS ${test_plugin_name} DESTINATION ${VPP_LIB_DIR_NAME}/vpp_api_test_plugins COMPONENT plugins) endif() - install(TARGETS ${plugin_name} DESTINATION lib/vpp_plugins COMPONENT plugins) + install(TARGETS ${plugin_name} DESTINATION ${VPP_LIB_DIR_NAME}/vpp_plugins COMPONENT plugins) endmacro() |