From 6a65e7eed35e49a459c09133b40d1dbd86e8a8d8 Mon Sep 17 00:00:00 2001 From: czekun Date: Tue, 28 Oct 2025 20:56:50 -0700 Subject: [PATCH] Fix cmake on linux for build type mapping check. --- cmake/onnxruntime_providers_openvino.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/onnxruntime_providers_openvino.cmake b/cmake/onnxruntime_providers_openvino.cmake index 8c8d58c30f594..42a3cc20c66b3 100644 --- a/cmake/onnxruntime_providers_openvino.cmake +++ b/cmake/onnxruntime_providers_openvino.cmake @@ -22,11 +22,14 @@ endif() # If building RelWithDebInfo and OV package does not have that configuration map to Release - get_target_property(ov_rt_implib_rwdi openvino::runtime IMPORTED_IMPLIB_RELWITHDEBINFO) - if ((CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) AND NOT ov_rt_implib_rwdi) + get_target_property(ov_rt_imploc_rwdi openvino::runtime IMPORTED_LOCATION_RELWITHDEBINFO) + if ((CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) AND NOT ov_rt_imploc_rwdi) set_target_properties(openvino::runtime PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release ) + set_target_properties(openvino::frontend::onnx PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release + ) endif() list(APPEND OPENVINO_LIB_LIST openvino::frontend::onnx openvino::runtime ${PYTHON_LIBRARIES})