set(MIMALLOC_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mimalloc CACHE STRING INTERNAL FORCE)
set(MIMALLOC_INCLUDES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mimalloc/include CACHE STRING INTERNAL FORCE)

set(MIMALLOC_sources
    ${MIMALLOC_SOURCES_DIR}/unitybuild.c
)
file(GLOB_RECURSE MIMALLOC_headers ${MIMALLOC_INCLUDES_DIR}/*.h ${MIMALLOC_INCLUDES_DIR}/*.hpp)

set(MIMALLOC_SOURCES ${MIMALLOC_sources} CACHE STRING INTERNAL FORCE)
set(MIMALLOC_HEADERS ${MIMALLOC_headers} CACHE STRING INTERNAL FORCE)