diff --git a/src/cmake/ie_parallel.cmake b/src/cmake/ie_parallel.cmake index e8aa1c30ef749f..259e4152c21946 100644 --- a/src/cmake/ie_parallel.cmake +++ b/src/cmake/ie_parallel.cmake @@ -282,7 +282,7 @@ function(set_ie_threading_interface_for TARGET_NAME) foreach(include_directory IN LISTS include_directories) # cannot include /usr/include headers as SYSTEM if(NOT "${include_directory}" MATCHES "^/usr.*$") - target_include_directories(${TARGET_NAME} SYSTEM BEFORE + target_include_directories(${TARGET_NAME} SYSTEM ${LINK_TYPE} $) else() set(_system_library ON) diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index c39aed70dca805..f567bfdd87ee86 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -89,13 +89,10 @@ elseif(RISCV64) set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "openvino_riscv_cpu_plugin") endif() -set_ie_threading_interface_for(${TARGET_NAME}) - ie_mark_target_as_cc(${TARGET_NAME}) target_link_libraries(${TARGET_NAME} PRIVATE dnnl ov_shape_inference - openvino::pugixml inference_engine_snippets) target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_EXTENSION_API) @@ -116,6 +113,10 @@ cross_compiled_file(${TARGET_NAME} NAMESPACE InferenceEngine::Extensions::Cpu::XARCH ) +# system dependencies must go last +target_link_libraries(${TARGET_NAME} PRIVATE openvino::pugixml) +set_ie_threading_interface_for(${TARGET_NAME}) + # must be called after all target_link_libraries ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})