Piccolo icon indicating copy to clipboard operation
Piccolo copied to clipboard

feature: can build on MACOS ARM

Open lzyyyyyy opened this issue 2 months ago • 2 comments

增加了macos arm芯片的编译适配

lzyyyyyy avatar Nov 17 '25 13:11 lzyyyyyy

https://github.com/BoomingTech/Piccolo/issues/508 修复这个issue

lzyyyyyy avatar Nov 17 '25 14:11 lzyyyyyy

It still failed to build on my M2 Pro chip model. First of all, I met an error threw by CMake in engine/3rdparty/tinyobjloader/CMakeLists.txt claiming that cmake_minimum_required when it was generating XCode project, which can be fixed after I modified the line like this:

cmake_minimum_required(VERSION 3.5...3.27)

However I still met an error within the compatibility of the implementation of sol2 library. With the assist of AI agent, I found that the problem lies in engine/3rdparty/sol2-3.3.0/include/sol/optional_implementation.hpp line 2193. It can be fixed with the following changes:

// return a reference to the temporary object
T temp(std::forward<Args>(args)...);
m_value = std::addressof(temp);
return *m_value;

I've pushed the fixes to my fork. Here's the link: https://github.com/AMagicPear/Piccolo-macOS-fix/tree/macos_arm_feature

With these fixes, the editor can be successfully built and launched. 截屏2025-11-22 19 01 21

AMagicPear avatar Nov 22 '25 10:11 AMagicPear