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})