OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CPU][ARM] Fix static OpenVINO build and install with in-tree ACL (#38672)
Leo9fd8328c08c6
diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.inindex 9eed376f8da..cf4350570ac 100644--- a/cmake/templates/OpenVINOConfig.cmake.in+++ b/cmake/templates/OpenVINOConfig.cmake.in@@ -507,6 +507,9 @@ set(_OV_ENABLE_OPENVINO_BUILD_SHARED "@BUILD_SHARED_LIBS@")if(NOT TARGET openvino)set(_ov_as_external_package ON)+ if(NOT _OV_ENABLE_OPENVINO_BUILD_SHARED)+ _ov_find_intel_cpu_dependencies()+ endif()include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOTargets.cmake")# since OpenVINO is compiled with _GLIBCXX_USE_CXX11_ABI=0diff --git a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmakeindex 6a29f07fc5a..8cca86d7a94 100644--- a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake+++ b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake@@ -48,6 +48,8 @@ if(ARM_COMPUTE_INCLUDE_DIR OR ARM_COMPUTE_LIB_DIR)IMPORTED_LOCATION ${ARM_COMPUTE_LIB})add_library(arm_compute::half INTERFACE IMPORTED GLOBAL)+ add_library(ArmCompute::arm_compute ALIAS arm_compute::arm_compute)+ add_library(ArmCompute::Half ALIAS arm_compute::half)if(ARM_COMPUTE_INCLUDE_DIR)set_target_properties(arm_compute::arm_compute arm_compute::half PROPERTIES@@ -98,6 +100,9 @@ elseif(ENABLE_ARM_COMPUTE_CMAKE)endif()add_subdirectory(${ARM_COMPUTE_SOURCE_DIR} ${ARM_COMPUTE_BINARY_DIR} EXCLUDE_FROM_ALL)+ if(NOT BUILD_SHARED_LIBS)+ set_target_properties(arm_compute PROPERTIES OUTPUT_NAME arm_compute-static)+ endif()if(NOT TARGET arm_compute::arm_compute)add_library(arm_compute::arm_compute ALIAS arm_compute)@@ -108,7 +113,9 @@ elseif(ENABLE_ARM_COMPUTE_CMAKE)INTERFACE_INCLUDE_DIRECTORIES "${ARM_COMPUTE_SOURCE_DIR}/include")endfunction()- ov_build_compute_library()+ if(NOT TARGET arm_compute::arm_compute)+ ov_build_compute_library()+ endif()# Setup for oneDNN integrationset(ACL_FOUND ON)diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txtindex faeb43e4609..21919e67a31 100644--- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt+++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt@@ -158,7 +158,7 @@ function(ov_add_onednn)# use ACLConfig.cmake in OpenVINOConfig.cmake in case of static build# we cannot use 'ov_install_static_lib' for imported targets,# but for this we need to install library files- install(FILES $<TARGET_PROPERTY:arm_compute::arm_compute,IMPORTED_LOCATION>+ install(FILES $<TARGET_FILE:arm_compute::arm_compute>DESTINATION ${OV_CPACK_ARCHIVEDIR}COMPONENT ${OV_CPACK_COMP_CORE}${OV_CPACK_COMP_CORE_EXCLUDE_ALL})