@@ -145,17 +145,18 @@ endfunction ()
145145# [STUB_INIT ON|OFF] [STUB_DIR <dir>] [STUB_PKG <pkg>] [STUB_PREFIX <prefix>]
146146# )
147147# Configure a target to integrate with TVM-FFI CMake utilities:
148- # - Optionally link against tvm_ffi_header and/or tvm_ffi_shared
148+ # - Link against tvm_ffi::header and/or tvm_ffi::shared
149149# - Always apply tvm_ffi_add_prefix_map(target_name <current source dir>)
150- # - Optionally enable Apple dSYM generation via tvm_ffi_add_apple_dsymutil(target_name)
151- # - Optionally apply MSVC-specific flags via tvm_ffi_add_msvc_flags(target_name)
150+ # - Enable Apple dSYM generation via tvm_ffi_add_apple_dsymutil(target_name)
151+ # - Apply MSVC-specific flags via tvm_ffi_add_msvc_flags(target_name)
152+ # - Add post-build step to generate Python stubs via tvm_ffi.stub.cli
152153#
153154# Parameters:
154155# target_name: Existing CMake target to modify (positional, required)
155156#
156157# Keyword parameters:
157- # LINK_SHARED: Whether to link tvm_ffi_shared into the target (default: ON; ON/OFF-style)
158- # LINK_HEADER: Whether to link tvm_ffi_header into the target (default: ON; ON/OFF-style)
158+ # LINK_SHARED: Whether to link tvm_ffi::shared into the target (default: ON; ON/OFF-style)
159+ # LINK_HEADER: Whether to link tvm_ffi::header into the target (default: ON; ON/OFF-style)
159160# DEBUG_SYMBOL: Whether to enable debug symbol post-processing hooks.
160161# On Apple this calls tvm_ffi_add_apple_dsymutil(target_name) (default: ON; ON/OFF-style)
161162# On non-Apple platforms this is currently a no-op unless you extend it. (default: ON)
@@ -257,24 +258,24 @@ function (tvm_ffi_configure_target target)
257258
258259 # LINK_HEADER
259260 if (tvm_ffi_arg__LINK_HEADER)
260- if (TARGET tvm_ffi_header )
261- target_link_libraries ("${target} " PRIVATE tvm_ffi_header )
261+ if (TARGET tvm_ffi::header )
262+ target_link_libraries ("${target} " PRIVATE tvm_ffi::header )
262263 else ()
263264 message (
264265 FATAL_ERROR
265- "tvm_ffi_configure_target(${target} ): LINK_HEADER requested but target 'tvm_ffi_header' does not exist."
266+ "tvm_ffi_configure_target(${target} ): LINK_HEADER requested but targets 'tvm_ffi::header' do not exist."
266267 )
267268 endif ()
268269 endif ()
269270
270271 # LINK_SHARED
271272 if (tvm_ffi_arg__LINK_SHARED)
272- if (TARGET tvm_ffi_shared )
273- target_link_libraries ("${target} " PRIVATE tvm_ffi_shared )
273+ if (TARGET tvm_ffi::shared )
274+ target_link_libraries ("${target} " PRIVATE tvm_ffi::shared )
274275 else ()
275276 message (
276277 FATAL_ERROR
277- "tvm_ffi_configure_target(${target} ): LINK_SHARED requested but target 'tvm_ffi_shared' does not exist."
278+ "tvm_ffi_configure_target(${target} ): LINK_SHARED requested but targets 'tvm_ffi::shared' do not exist."
278279 )
279280 endif ()
280281 endif ()
0 commit comments