diff --git a/core/libs/prx/libSceAvPlayer/CMakeLists.txt b/core/libs/prx/libSceAvPlayer/CMakeLists.txt index 5704db980e..514e6ed541 100644 --- a/core/libs/prx/libSceAvPlayer/CMakeLists.txt +++ b/core/libs/prx/libSceAvPlayer/CMakeLists.txt @@ -44,7 +44,7 @@ if(BUILD_TESTING) if(WIN32 AND TARGET mimalloc) add_dependencies(avplayer_http_patched_closure mimalloc pe_import_first) set(httpPatchedAllocatorArguments - -DALLOCATOR_DIRECTORY=$ + -DALLOCATOR=$ -DIMPORT_FIRST=$) endif() add_dependencies(avplayer_http_patched_modules_tests avplayer_http_patched_closure diff --git a/core/libs/tests/AvPlayerHttpModules.cmake b/core/libs/tests/AvPlayerHttpModules.cmake index 2eea029e12..8a9b3ad69e 100644 --- a/core/libs/tests/AvPlayerHttpModules.cmake +++ b/core/libs/tests/AvPlayerHttpModules.cmake @@ -52,10 +52,10 @@ foreach(index RANGE 0 5) endif() message("${output}${error}") endforeach() -if(WIN32 AND DEFINED ALLOCATOR_DIRECTORY) - foreach(allocator mimalloc.dll mimalloc-redirect.dll) - file(COPY_FILE "${ALLOCATOR_DIRECTORY}/${allocator}" "${stage}/${allocator}") - endforeach() +if(WIN32 AND DEFINED ALLOCATOR) + get_filename_component(allocatorDirectory "${ALLOCATOR}" DIRECTORY) + file(COPY_FILE "${ALLOCATOR}" "${stage}/mimalloc.dll") + file(COPY_FILE "${allocatorDirectory}/mimalloc-redirect.dll" "${stage}/mimalloc-redirect.dll") execute_process(COMMAND "${IMPORT_FIRST}" "${stage}/mimalloc.dll" mimalloc-redirect.dll RESULT_VARIABLE status OUTPUT_VARIABLE output ERROR_VARIABLE error) if(NOT status STREQUAL "0")