File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ if(MSVC)
4949  add_library (aoti_cuda SHARED ${_aoti_cuda_sources} )
5050  # Define export macro for Windows DLL 
5151  target_compile_definitions (aoti_cuda PRIVATE  EXPORT_AOTI_FUNCTIONS)
52+   # Ensure proper DLL import/export library naming on Windows 
53+   set_target_properties (aoti_cuda PROPERTIES
54+     WINDOWS_EXPORT_ALL_SYMBOLS OFF   # We use explicit exports via AOTI_CUDA_EXPORT 
55+     RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR} /bin
56+     LIBRARY_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR} /lib
57+     ARCHIVE_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR} /lib
58+   )
5259else ()
5360  add_library (aoti_cuda STATIC  ${_aoti_cuda_sources} )
5461endif ()
@@ -89,5 +96,7 @@ endif()
8996install (
9097  TARGETS aoti_cuda
9198  EXPORT  ExecuTorchTargets
92-   DESTINATION  lib
99+   LIBRARY DESTINATION  lib
100+   ARCHIVE DESTINATION  lib
101+   RUNTIME DESTINATION  bin
93102)
Original file line number Diff line number Diff line change @@ -101,16 +101,6 @@ endif()
101101list (APPEND  link_libraries  tokenizers::tokenizers)
102102
103103add_executable (voxtral_runner ${_srcs} )
104- 
105- # On MSVC, ensure the aoti_cuda DLL is copied to the output directory 
106- if (EXECUTORCH_BUILD_CUDA AND  MSVC )
107-   add_custom_command (TARGET  voxtral_runner POST_BUILD
108-     COMMAND  ${CMAKE_COMMAND}  -E copy_if_different
109-       $<TARGET_FILE:aoti_cuda>
110-       $<TARGET_FILE_DIR:voxtral_runner>
111-     COMMENT  "Copying aoti_cuda.dll to output directory" 
112-   )
113- endif ()
114104if (NOT  CMAKE_BUILD_TYPE  STREQUAL  "Debug" )
115105  target_link_options_gc_sections(voxtral_runner)
116106  if (NOT  APPLE )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments