mimalloc provides CMake targets: find_package(mimalloc CONFIG REQUIRED) target_link_libraries(main PRIVATE $,mimalloc-static,mimalloc)