Skip to content

Commit

Permalink
Disable mimalloc for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kbinani committed Dec 10, 2024
1 parent e2018c2 commit b43778d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ target_link_libraries(mcview
PRIVATE
mcview-binary-data
je2be
mimalloc
juce::juce_gui_extra
juce::juce_opengl
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
)
if (MSVC)
target_link_libraries(mcview PRIVATE mimalloc)
endif()

target_include_directories(mcview
PRIVATE
Expand Down
4 changes: 4 additions & 0 deletions Source/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#include <juce_gui_extra/juce_gui_extra.h>
#include <juce_opengl/juce_opengl.h>
#include <leveldb/env.h>
#if !defined(__APPLE__)
#include <mimalloc.h>
#endif
#include <minecraft-file.hpp>
#include <nlohmann/json.hpp>

Expand Down Expand Up @@ -98,7 +100,9 @@ class Application : public juce::JUCEApplication {
void initialise(juce::String const &) override {
using namespace juce;

#if !defined(__APPLE__)
(void)mi_version();
#endif

#if MCVIEW_ENABLE_PALETTE_PREP
// 1. Execute the line below.
Expand Down

0 comments on commit b43778d

Please sign in to comment.