add_subdirectory(libdxfrw)
endif()
-message(STATUS "Using in-tree mimalloc")
-set(MI_OVERRIDE OFF CACHE BOOL "")
-set(MI_BUILD_SHARED OFF CACHE BOOL "")
-set(MI_BUILD_OBJECT OFF CACHE BOOL "")
-set(MI_BUILD_TESTS OFF CACHE BOOL "")
-if(EMSCRIPTEN)
- # HACK: We only use mimalloc for the temporary heap, not as a general purpose
- # allocator. However, the Emscripten port of mimalloc assumes that it is used
- # as the system allocator, and depends on the slow emmalloc allocator.
- # We do not want to enable emmalloc, as that would slow down allocations all
- # over the place, so we must either use mimalloc as the system allocator as
- # well, or override its definitions to just use the existing system allocator.
- # The latter option is the least intrusive change from a stability standpoint,
- # so for now that's what we do here. We can try to convert to mimalloc wholsale
- # and remove this hack if we find the need to do so in the future.
- set(MI_EXTRA_CPPDEFS "emmalloc_free=free;emmalloc_memalign=memalign" CACHE INTERNAL "")
-endif()
-add_subdirectory(extlib/mimalloc EXCLUDE_FROM_ALL)
-set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
+find_package(mimalloc CONFIG)
if(NOT FORCE_VENDORED_Eigen3)
find_package(Eigen3 CONFIG)
target_sources(slvs-interface INTERFACE lib.cpp)
target_compile_definitions(slvs-interface INTERFACE -DLIBRARY)
target_include_directories(slvs-interface INTERFACE ${CMAKE_SOURCE_DIR}/include)
-target_link_libraries(slvs-interface INTERFACE slvs-solver mimalloc-static)
+target_link_libraries(slvs-interface INTERFACE slvs-solver mimalloc)
if(ENABLE_PYTHON_LIB)
add_custom_command(