File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -265,10 +265,16 @@ if(MI_BUILD_SHARED)
265265 )
266266 if (WIN32 )
267267 # On windows copy the mimalloc redirection dll too.
268- target_link_libraries (mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /bin/mimalloc-redirect.lib)
268+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
269+ set (MIMALLOC_REDIRECT_SUFFIX "32" )
270+ else ()
271+ set (MIMALLOC_REDIRECT_SUFFIX "" )
272+ endif ()
273+
274+ target_link_libraries (mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX} .lib)
269275 add_custom_command (TARGET mimalloc POST_BUILD
270- COMMAND "${CMAKE_COMMAND} " -E copy "${CMAKE_CURRENT_SOURCE_DIR} /bin/mimalloc-redirect.dll" $<TARGET_FILE_DIR:mimalloc>
271- COMMENT "Copy mimalloc-redirect.dll to output directory" )
276+ COMMAND "${CMAKE_COMMAND} " -E copy "${CMAKE_CURRENT_SOURCE_DIR} /bin/mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX} .dll" $<TARGET_FILE_DIR:mimalloc>
277+ COMMENT "Copy mimalloc-redirect${MIMALLOC_REDIRECT_SUFFIX} .dll to output directory" )
272278 endif ()
273279
274280 if (MI_INSTALL_TOPLEVEL MATCHES "ON" )
You can’t perform that action at this time.
0 commit comments