mimalloc/contrib/vcpkg
2025-03-06 19:21:45 -08:00
..
portfile.cmake Merge branch 'dev' into dev2 2025-03-06 19:21:45 -08:00
readme.md add INTERFACE_INCLUDE_DIRECTORIES to vckpcg wrapper 2025-01-13 16:03:36 -08:00
usage update vcpkg instructions 2025-01-10 09:19:08 -08:00
vcpkg-cmake-wrapper.cmake vcpkg: remove INTERFACE_INCLUDE_DIRECTORIES again 2025-01-13 16:57:59 -08:00
vcpkg.json Merge branch 'dev' into dev2 2025-03-06 19:21:45 -08:00

Vcpkg support

This directory is meant to provide the sources for the official vcpkg port of mimalloc, but can also be used to override the official port with your own variant.

For example, you can edit the portfile.cmake to check out a specific commit, version, or branch of mimalloc, or set further options. You can install such custom port as:

$ vcpkg install "mimalloc[override]" --recurse --overlay-ports=./contrib/vcpkg

This will also show the correct sha512 hash if you use a custom version. Another way is to refer to the overlay from the vcpkg-configuration.json file. See also the vcpkg documentation for more information.

Using mimalloc from vcpkg

When using cmake with vcpkg, you can use mimalloc from the CMakeLists.txt as:

find_package(mimalloc CONFIG REQUIRED)
target_link_libraries(main PRIVATE mimalloc)

See `test/CMakeLists.txt for more examples.

Acknowledgements

The original port for vckpg was contributed by many people, including: @vicroms, @myd7349, @PhoubeHui, @LilyWangL, @JonLiu1993, @RT2Code, Remy Tassoux, @wangao, @BillyONeal, @jiayuehua, @dg0yt, @gerar-ryan-immersaview, @nickdademo, and @jimwang118 -- Thank you so much!