Fix a tiny problem in winml.cmake (#23173)

### Description
CMake's
[target_link_libraries](https://cmake.org/cmake/help/latest/command/target_link_libraries.html#id2)
function accepts plain library name(like `re2`) or target name(like
`re2::re2`) or some other kinds of names. "plain library names" are
old-fashioned, for compatibility only. We should use target names.

### Motivation and Context
To make vcpkg work with winml build. See #23158
This commit is contained in:
Changming Sun 2024-12-20 11:48:43 -08:00 committed by GitHub
parent 00b262dbb4
commit fcc34da5e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -782,7 +782,7 @@ add_dependencies(winml_dll winml_api_native)
add_dependencies(winml_dll winml_api_native_internal)
# Link libraries
target_link_libraries(winml_dll PRIVATE re2)
target_link_libraries(winml_dll PRIVATE re2::re2)
target_link_libraries(winml_dll PRIVATE ${WIL_TARGET})
target_link_libraries(winml_dll PRIVATE winml_lib_api)
if (NOT winml_is_inbox)