Skip to content

Commit

Permalink
Fix a tiny problem in winml.cmake (#23173)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
snnn authored Dec 20, 2024
1 parent 00b262d commit fcc34da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/winml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fcc34da

Please sign in to comment.