Migrate to CMake-based build with packaging

Major build system refactoring:

**CMake (build authority)**:
- Auto-discovers .cpp files (GLOB_RECURSE in source/core/ and source/game/)
- No manual file list maintenance needed
- Excludes source/legacy/ automatically
- Generates build/project.h from template

**Makefile (simplified wrapper)**:
- Delegates compilation to CMake (make → cmake --build build)
- Contains 5 release packaging targets:
  * macos_release: .app bundle + .dmg (Apple Silicon)
  * linux_release: .tar.gz
  * windows_release: .zip with .exe + DLLs
  * windows_cross: cross-compile from Linux/macOS
  * rpi_release: ARM64 cross-compile
- Complex packaging logic preserved (code signing, symlinks, DMG creation)

**Benefits**:
- Add new .cpp file → automatically compiled (no manual updates)
- Single source of truth in CMakeLists.txt (no duplication)
- IDE-friendly (VSCode, CLion, etc.)
- Complete packaging support (5 platforms)

**Files changed**:
- CMakeLists.txt: GLOB_RECURSE replaces 23-file hardcoded list
- Makefile: Simplified compilation + added 5 release targets (~220 lines)
- CLAUDE.md: Updated build system documentation
- escena_titol.cpp: Fixed include path (build/project.h → project.h)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-03 07:36:53 +01:00
parent d6b2e97777
commit 69fb5f3cc1
4 changed files with 352 additions and 171 deletions

View File

@@ -9,7 +9,7 @@
#include "../../core/audio/audio.hpp"
#include "../../core/system/gestor_escenes.hpp"
#include "../../core/system/global_events.hpp"
#include "build/project.h"
#include "project.h"
EscenaTitol::EscenaTitol(SDLManager& sdl)
: sdl_(sdl),