From e6c51fc6f98cfb61ccda66f585e2951ff9c80478 Mon Sep 17 00:00:00 2001 From: Seethepalli <7uz@ornl.gov> Date: Tue, 2 Dec 2025 19:16:37 -0500 Subject: [PATCH 1/9] Add optional mimalloc allocator support for Release builds. --- CMake/find_runtime_deps.cmake | 20 ++++++++++ CMakeLists.txt | 71 ++++++++++++++++++++++++++++++++++- PluginManager/CMakeLists.txt | 7 ++++ RoiManager/CMakeLists.txt | 7 ++++ cvutil/CMakeLists.txt | 18 +++++++++ 5 files changed, 122 insertions(+), 1 deletion(-) diff --git a/CMake/find_runtime_deps.cmake b/CMake/find_runtime_deps.cmake index db52395..9171073 100644 --- a/CMake/find_runtime_deps.cmake +++ b/CMake/find_runtime_deps.cmake @@ -87,3 +87,23 @@ if(unresolved) endif() endforeach() endif() + +# Add any additional runtime dependencies that weren't auto-detected +# This is passed as EXTRA_RUNTIME_DEPS variable +if(DEFINED EXTRA_RUNTIME_DEPS) + foreach(extra_dep IN LISTS EXTRA_RUNTIME_DEPS) + if(EXISTS "${extra_dep}") + get_filename_component(dep_name "${extra_dep}" NAME) + set(dest "${INSTALL_BIN}/${dep_name}") + if(NOT EXISTS "${dest}") + file(INSTALL "${extra_dep}" DESTINATION "${INSTALL_BIN}") + message(STATUS "Copied extra dependency: ${dep_name}") + else() + message(STATUS "Extra dependency already exists: ${dep_name}") + endif() + # Add to the runtime dependencies list + file(APPEND "${BINARY_DIR}/cvutil_runtime_dependencies-${BUILD_CONFIG}.cmake" + "set(CVUTIL_RUNTIME_DEPENDENCIES \"\${CVUTIL_RUNTIME_DEPENDENCIES};\${CMAKE_CURRENT_LIST_DIR}/../../../bin/${dep_name}\")\n") + endif() + endforeach() +endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ac2be2..556a8db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) option(ENABLE_AVX512 "Enable AVX-512 support" OFF) # To be enabled on x86_64 server processors option(ENABLE_AVX2_FMA "Enable AVX2 and FMA support" ON) # Default support for x86_64 desktop processors +# Option to enable mimalloc for Release builds +option(USE_MIMALLOC "Use mimalloc allocator for Release builds" ON) + # Detect the OS if(WIN32) message(STATUS "Configuring for Windows") @@ -43,7 +46,7 @@ message(STATUS "Using ${CMAKE_CXX_COMPILER_ID} as the C++ compiler") # Create an interface library for compiler flags (modern CMake approach) add_library(cvutil_compiler_flags INTERFACE) - # MSVC-specific flags +# MSVC-specific flags target_compile_options(cvutil_compiler_flags INTERFACE $<$: $<$:/MDd /Zi /Ob0 /Od /RTC1 /fsanitize=address> @@ -97,6 +100,57 @@ target_link_options(cvutil_compiler_flags INTERFACE # endif() # endif() +# Build mimalloc for both Debug and Release builds using ExternalProject +if(USE_MIMALLOC) + include(ExternalProject) + + message(STATUS "Building mimalloc as external project (will be linked for Debug and Release configurations)...") + + # Determine build directory for mimalloc + set(MIMALLOC_PREFIX ${CMAKE_BINARY_DIR}/_external/mimalloc) + set(MIMALLOC_INSTALL_DIR ${MIMALLOC_PREFIX}/install) + + # Use ExternalProject_Add for complete control - this excludes mimalloc from install + # Build for both Debug (with ASAN tracking) and Release (without ASAN) + ExternalProject_Add( + mimalloc_external + GIT_REPOSITORY https://github.com/microsoft/mimalloc.git + GIT_TAG v2.2.4 + PREFIX ${MIMALLOC_PREFIX} + CMAKE_ARGS + -DCMAKE_BUILD_TYPE=$ + -DMI_BUILD_SHARED=ON + -DMI_BUILD_STATIC=OFF + -DMI_BUILD_TESTS=OFF + -DMI_BUILD_OBJECT=OFF + -DMI_OVERRIDE=ON + # $<$:-DMI_TRACK_ASAN=ON> + # $<$:-DMI_SHOW_ERRORS=ON> + -DCMAKE_INSTALL_PREFIX=${MIMALLOC_INSTALL_DIR} + BUILD_BYPRODUCTS + ${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll + ${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll + ${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib + ) + + # Create imported target for linking + add_library(mimalloc SHARED IMPORTED GLOBAL) + add_dependencies(mimalloc mimalloc_external) + set_target_properties(mimalloc PROPERTIES + IMPORTED_LOCATION ${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll + IMPORTED_IMPLIB ${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib + ) + + # Create imported target for mimalloc-redirect + add_library(mimalloc-redirect SHARED IMPORTED GLOBAL) + add_dependencies(mimalloc-redirect mimalloc_external) + set_target_properties(mimalloc-redirect PROPERTIES + IMPORTED_LOCATION ${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll + ) + + message(STATUS "mimalloc external project configured") +endif() + # Find OpenCV find_package(OpenCV REQUIRED) @@ -175,6 +229,17 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() + # Install mimalloc DLLs if used (only runtime DLLs, no headers/cmake files) + if(USE_MIMALLOC) + install(FILES + ${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll + ${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll + CONFIGURATIONS Release + DESTINATION bin + COMPONENT runtime + ) + endif() + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Set RPATH to include our bundled libraries # set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib/cvutil;\$ORIGIN/../lib;/usr/lib/x86_64-linux-gnu;/lib/x86_64-linux-gnu") @@ -329,6 +394,10 @@ install(EXPORT cvutilTargets COMPONENT development ) +# Note: mimalloc is NOT exported in cvutilTargets +# It's an internal dependency that gets loaded automatically via DLL dependencies +# Applications should NOT link to cvutil::mimalloc - it doesn't exist + # Add to your root CMakeLists.txt configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CMake/copy_runtime_dependencies.cmake diff --git a/PluginManager/CMakeLists.txt b/PluginManager/CMakeLists.txt index e9f998e..befd501 100644 --- a/PluginManager/CMakeLists.txt +++ b/PluginManager/CMakeLists.txt @@ -59,6 +59,13 @@ target_link_libraries(PluginManager Qt6::OpenGL ) +# Link mimalloc for Release builds only +if(USE_MIMALLOC) + target_link_libraries(PluginManager PRIVATE $<$:mimalloc>) + target_link_options(PluginManager PRIVATE $<$:/INCLUDE:mi_version>) + message(STATUS "PluginManager will use mimalloc shared library for Release configuration") +endif() + target_compile_definitions(PluginManager PRIVATE PLUGINMANAGER_SOURCE) set(PUBLIC_HEADERS diff --git a/RoiManager/CMakeLists.txt b/RoiManager/CMakeLists.txt index fd1ff7c..e858773 100644 --- a/RoiManager/CMakeLists.txt +++ b/RoiManager/CMakeLists.txt @@ -52,6 +52,13 @@ target_link_libraries(RoiManager Qt6::OpenGL ) +# Link mimalloc for Release builds only +if(USE_MIMALLOC) + target_link_libraries(RoiManager PRIVATE $<$:mimalloc>) + target_link_options(RoiManager PRIVATE $<$:/INCLUDE:mi_version>) + message(STATUS "RoiManager will use mimalloc shared library for Release configuration") +endif() + target_compile_definitions(RoiManager PRIVATE ROIMANAGER_SOURCE) set(PUBLIC_HEADERS diff --git a/cvutil/CMakeLists.txt b/cvutil/CMakeLists.txt index 9697577..6247195 100644 --- a/cvutil/CMakeLists.txt +++ b/cvutil/CMakeLists.txt @@ -120,6 +120,18 @@ target_link_libraries(cvutil RoiManager ) +# Link mimalloc for Release builds only +if(USE_MIMALLOC) + if(TARGET mimalloc) + target_link_libraries(cvutil PRIVATE $<$:mimalloc>) + # Force the linker to include mimalloc.dll as a dependency + target_link_options(cvutil PRIVATE $<$:/INCLUDE:mi_version>) + message(STATUS "cvutil will use mimalloc shared library for Release configuration") + else() + message(WARNING "USE_MIMALLOC is ON but mimalloc target not found!") + endif() +endif() + target_compile_definitions(cvutil PRIVATE CVUTIL_SOURCE) set(PUBLIC_HEADERS @@ -233,11 +245,17 @@ endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows") # Build search directories list for runtime dependency detection set(RUNTIME_SEARCH_DIRS ${DEP_PATH}) + if(USE_MIMALLOC AND TARGET mimalloc) + # Add mimalloc install directory to search paths + list(APPEND RUNTIME_SEARCH_DIRS ${MIMALLOC_INSTALL_DIR}/bin) + endif() + add_custom_command(TARGET cvutil POST_BUILD COMMAND ${CMAKE_COMMAND} -D TARGET_FILE=$ -D INSTALL_BIN=${CMAKE_INSTALL_PREFIX}/$,bin,lib/cvutil> -D SEARCH_DIRS="${RUNTIME_SEARCH_DIRS}" + -D EXTRA_RUNTIME_DEPS="$<$,$>:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll;${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll>$<$:;${ASAN_RUNTIME_DEP}>" -D BUILD_CONFIG=$ -D BINARY_DIR=${CMAKE_BINARY_DIR} -P "${CMAKE_CURRENT_SOURCE_DIR}/../CMake/find_runtime_deps.cmake" From 3ba68201ea4a47d4562de489eb145957e4a9feb2 Mon Sep 17 00:00:00 2001 From: Anand Seethepalli <16312669+asn5d@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:38:13 -0500 Subject: [PATCH 2/9] Update RoiManager/CMakeLists.txt to check mimalloc target exists before linking. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- RoiManager/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/RoiManager/CMakeLists.txt b/RoiManager/CMakeLists.txt index e858773..4efa2ba 100644 --- a/RoiManager/CMakeLists.txt +++ b/RoiManager/CMakeLists.txt @@ -54,9 +54,13 @@ target_link_libraries(RoiManager # Link mimalloc for Release builds only if(USE_MIMALLOC) - target_link_libraries(RoiManager PRIVATE $<$:mimalloc>) - target_link_options(RoiManager PRIVATE $<$:/INCLUDE:mi_version>) - message(STATUS "RoiManager will use mimalloc shared library for Release configuration") + if(TARGET mimalloc) + target_link_libraries(RoiManager PRIVATE $<$:mimalloc>) + target_link_options(RoiManager PRIVATE $<$:/INCLUDE:mi_version>) + message(STATUS "RoiManager will use mimalloc shared library for Release configuration") + else() + message(WARNING "USE_MIMALLOC is ON but mimalloc target not found!") + endif() endif() target_compile_definitions(RoiManager PRIVATE ROIMANAGER_SOURCE) From 2014fffc5525bac4221ac7a196f25a4cc982a416 Mon Sep 17 00:00:00 2001 From: Anand Seethepalli <16312669+asn5d@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:38:56 -0500 Subject: [PATCH 3/9] Update PluginManager/CMakeLists.txt to check mimalloc target exists before linking. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- PluginManager/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PluginManager/CMakeLists.txt b/PluginManager/CMakeLists.txt index befd501..10242bc 100644 --- a/PluginManager/CMakeLists.txt +++ b/PluginManager/CMakeLists.txt @@ -61,9 +61,13 @@ target_link_libraries(PluginManager # Link mimalloc for Release builds only if(USE_MIMALLOC) - target_link_libraries(PluginManager PRIVATE $<$:mimalloc>) - target_link_options(PluginManager PRIVATE $<$:/INCLUDE:mi_version>) - message(STATUS "PluginManager will use mimalloc shared library for Release configuration") + if(TARGET mimalloc) + target_link_libraries(PluginManager PRIVATE $<$:mimalloc>) + target_link_options(PluginManager PRIVATE $<$:/INCLUDE:mi_version>) + message(STATUS "PluginManager will use mimalloc shared library for Release configuration") + else() + message(WARNING "USE_MIMALLOC is ON but mimalloc target not found!") + endif() endif() target_compile_definitions(PluginManager PRIVATE PLUGINMANAGER_SOURCE) From 376b7cb4398e9549bfc79f1dad195f7409c74819 Mon Sep 17 00:00:00 2001 From: Anand Seethepalli <16312669+asn5d@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:55:31 -0500 Subject: [PATCH 4/9] Update CMakeLists.txt to show message that mimalloc will be linked for Release only. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 556a8db..8841f1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ target_link_options(cvutil_compiler_flags INTERFACE if(USE_MIMALLOC) include(ExternalProject) - message(STATUS "Building mimalloc as external project (will be linked for Debug and Release configurations)...") + message(STATUS "Building mimalloc as external project (will be linked for Release configuration)...") # Determine build directory for mimalloc set(MIMALLOC_PREFIX ${CMAKE_BINARY_DIR}/_external/mimalloc) From 97d1f8f924580bdd6c29c4d3fd3232ea3194a1fe Mon Sep 17 00:00:00 2001 From: Anand Seethepalli <16312669+asn5d@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:59:46 -0500 Subject: [PATCH 5/9] Added link option /INCLUDE:mi_version in cvutil/CMakeLists.txt only for MSVC Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cvutil/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvutil/CMakeLists.txt b/cvutil/CMakeLists.txt index 6247195..b27e26a 100644 --- a/cvutil/CMakeLists.txt +++ b/cvutil/CMakeLists.txt @@ -125,7 +125,7 @@ if(USE_MIMALLOC) if(TARGET mimalloc) target_link_libraries(cvutil PRIVATE $<$:mimalloc>) # Force the linker to include mimalloc.dll as a dependency - target_link_options(cvutil PRIVATE $<$:/INCLUDE:mi_version>) + target_link_options(cvutil PRIVATE $<$,$>:/INCLUDE:mi_version>) message(STATUS "cvutil will use mimalloc shared library for Release configuration") else() message(WARNING "USE_MIMALLOC is ON but mimalloc target not found!") From 228d059ca68d1739930c11212edd960a3f027cb7 Mon Sep 17 00:00:00 2001 From: Anand Seethepalli <16312669+asn5d@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:18:51 -0500 Subject: [PATCH 6/9] Updated CMakeLists.txt to include platform specific import locations. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CMakeLists.txt | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8841f1c..8ec53aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,24 +128,33 @@ if(USE_MIMALLOC) # $<$:-DMI_SHOW_ERRORS=ON> -DCMAKE_INSTALL_PREFIX=${MIMALLOC_INSTALL_DIR} BUILD_BYPRODUCTS - ${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll - ${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll - ${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib + $<$:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll> + $<$:${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.so> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dylib> ) # Create imported target for linking add_library(mimalloc SHARED IMPORTED GLOBAL) add_dependencies(mimalloc mimalloc_external) set_target_properties(mimalloc PROPERTIES - IMPORTED_LOCATION ${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll - IMPORTED_IMPLIB ${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib + IMPORTED_LOCATION + $<$:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.so> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dylib> + IMPORTED_IMPLIB + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc.dll.lib> ) # Create imported target for mimalloc-redirect add_library(mimalloc-redirect SHARED IMPORTED GLOBAL) add_dependencies(mimalloc-redirect mimalloc_external) set_target_properties(mimalloc-redirect PROPERTIES - IMPORTED_LOCATION ${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll + IMPORTED_LOCATION + $<$:${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc-redirect.so> + $<$:${MIMALLOC_INSTALL_DIR}/lib/mimalloc-redirect.dylib> ) message(STATUS "mimalloc external project configured") From e6eacd8f40e36ae348edea36933b424a3cfac3ac Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 12:27:28 -0500 Subject: [PATCH 7/9] Fix generator expression in ExternalProject_Add for mimalloc (#8) * Initial plan * Replace $ with ${CMAKE_BUILD_TYPE} in ExternalProject_Add Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> * Use hardcoded Release build type for mimalloc ExternalProject Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ec53aa..e5ca2d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ if(USE_MIMALLOC) GIT_TAG v2.2.4 PREFIX ${MIMALLOC_PREFIX} CMAKE_ARGS - -DCMAKE_BUILD_TYPE=$ + -DCMAKE_BUILD_TYPE=Release -DMI_BUILD_SHARED=ON -DMI_BUILD_STATIC=OFF -DMI_BUILD_TESTS=OFF From 99c9cf7bbbebff1503a2e4b129d8053899b64c2e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 12:33:28 -0500 Subject: [PATCH 8/9] Remove undefined ASAN_RUNTIME_DEP from runtime deps (#9) * Initial plan * Remove undefined ASAN_RUNTIME_DEP from EXTRA_RUNTIME_DEPS Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --- cvutil/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvutil/CMakeLists.txt b/cvutil/CMakeLists.txt index b27e26a..e3cba17 100644 --- a/cvutil/CMakeLists.txt +++ b/cvutil/CMakeLists.txt @@ -255,7 +255,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") -D TARGET_FILE=$ -D INSTALL_BIN=${CMAKE_INSTALL_PREFIX}/$,bin,lib/cvutil> -D SEARCH_DIRS="${RUNTIME_SEARCH_DIRS}" - -D EXTRA_RUNTIME_DEPS="$<$,$>:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll;${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll>$<$:;${ASAN_RUNTIME_DEP}>" + -D EXTRA_RUNTIME_DEPS="$<$,$>:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll;${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll>" -D BUILD_CONFIG=$ -D BINARY_DIR=${CMAKE_BINARY_DIR} -P "${CMAKE_CURRENT_SOURCE_DIR}/../CMake/find_runtime_deps.cmake" From dee3321a0a22316c19e4ee9b43b59d6882946431 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:48:57 -0500 Subject: [PATCH 9/9] Remove undefined ASAN_RUNTIME_DEP from runtime deps (#10) * Initial plan * Remove undefined ASAN_RUNTIME_DEP from EXTRA_RUNTIME_DEPS expression Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> * Use $ syntax for EXTRA_RUNTIME_DEPS generator expression Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com> --- cvutil/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvutil/CMakeLists.txt b/cvutil/CMakeLists.txt index e3cba17..077ea84 100644 --- a/cvutil/CMakeLists.txt +++ b/cvutil/CMakeLists.txt @@ -255,7 +255,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") -D TARGET_FILE=$ -D INSTALL_BIN=${CMAKE_INSTALL_PREFIX}/$,bin,lib/cvutil> -D SEARCH_DIRS="${RUNTIME_SEARCH_DIRS}" - -D EXTRA_RUNTIME_DEPS="$<$,$>:${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll;${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll>" + -D EXTRA_RUNTIME_DEPS="$,$>,${MIMALLOC_INSTALL_DIR}/bin/mimalloc.dll;${MIMALLOC_INSTALL_DIR}/bin/mimalloc-redirect.dll,>" -D BUILD_CONFIG=$ -D BINARY_DIR=${CMAKE_BINARY_DIR} -P "${CMAKE_CURRENT_SOURCE_DIR}/../CMake/find_runtime_deps.cmake"