Skip to content

Conversation

@lzyyyyyy
Copy link

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

@lzyyyyyy
Copy link
Author

#508 修复这个issue

@AMagicPear
Copy link

AMagicPear commented Nov 22, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants