refactor(build): update CMake configurations and toolchain for macOS

- Modified CMake settings to ensure consistent use of the Homebrew LLVM/Clang installation on macOS.
- Added a new toolchain file to specify the correct compiler and header search paths, resolving potential conflicts.
- Updated CMake presets to enable the EMU build and set appropriate compiler flags.

Benefits:
- Enhances build reliability and compatibility on macOS by utilizing the Homebrew LLVM toolchain.
- Streamlines the build process with improved configuration management.
This commit is contained in:
scawful
2025-10-14 01:06:35 -04:00
parent 55f6ed93bc
commit a026207a2d
5 changed files with 62 additions and 16 deletions

View File

@@ -17,7 +17,7 @@
"YAZE_BUILD_APP": "ON",
"YAZE_BUILD_LIB": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_EMU": "OFF"
"YAZE_BUILD_EMU": "ON"
}
},
{
@@ -57,8 +57,12 @@
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"toolchainFile": "${sourceDir}/cmake/llvm-brew.toolchain.cmake",
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0"
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_C_COMPILER": "/opt/homebrew/opt/llvm@18/bin/clang",
"CMAKE_CXX_COMPILER": "/opt/homebrew/opt/llvm@18/bin/clang++",
"CMAKE_CXX_FLAGS": "-isystem /opt/homebrew/opt/llvm@18/include/c++/v1"
}
},
{
@@ -162,6 +166,7 @@
"displayName": "macOS z3ed",
"description": "macOS z3ed CLI with agent support",
"inherits": "mac-ai",
"toolchainFile": "${sourceDir}/cmake/llvm-brew.toolchain.cmake",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"Z3ED_AI": "ON",
@@ -170,8 +175,6 @@
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_EMU": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_UI_TESTS": "ON",
"YAZE_ENABLE_IMGUI_TEST_ENGINE": "ON",
"CMAKE_BUILD_TYPE": "Debug"
}
},