Skip to content

Commit fcc34da

Browse files
authored
Fix a tiny problem in winml.cmake (microsoft#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 microsoft#23158
1 parent 00b262d commit fcc34da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/winml.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ add_dependencies(winml_dll winml_api_native)
782782
add_dependencies(winml_dll winml_api_native_internal)
783783

784784
# Link libraries
785-
target_link_libraries(winml_dll PRIVATE re2)
785+
target_link_libraries(winml_dll PRIVATE re2::re2)
786786
target_link_libraries(winml_dll PRIVATE ${WIL_TARGET})
787787
target_link_libraries(winml_dll PRIVATE winml_lib_api)
788788
if (NOT winml_is_inbox)

0 commit comments

Comments
 (0)