Bump impeller-cmake
1 file changed
tree: dbc13c5571abdbe3851e82d57b22ca0712a50e7a
  1. .github/
  2. .vscode/
  3. assets_src/
  4. src/
  5. third_party/
  6. toolchains/
  7. .clang-format
  8. .gitignore
  9. .gitmodules
  10. CMakeLists.txt
  11. CMakePresets.json
  12. deps.sh
  13. imgui.cmake
  14. LICENSE
  15. README.md
README.md

impeller-cmake Example Project

Supported build environments

This CMake project compiles parts of Flutter Engine, including Impeller's renderer layer and FML. The Flutter Engine codebase only supports building against Clang.

Windows

This repository is tested against the x64 Native Tools Command Prompt for VS 2022.

macOS

This repository is tested against Homebrew Clang 13.0.0, which ships with the homebrew llvm package.

SteamDeck (ArchLinux)

Note: Don‘t do this unless you’re comfortable with restoring if things go wrong.

# Set a password for the user.
passwd

# Disable filesystem read-only mode.
sudo btrfs property set -ts / ro false

# Install archlinux maintainer public keys.
sudo pacman-key --init
sudo pacman-key --populate archlinux

# Install build dependencies.
sudo pacman -Sy cmake
# The following dependencies should already be installed on the SteamDeck,
# but they need to be reinstalled in order to populate missing headers.
sudo pacman -Sy mesa libglvnd xorgproto libxrandr libxinerama libxcursor libxi libxext gcc linux-api-headers libx11 libxrender libxfixes

Fetching dependencies

  1. Clone the repository and fetch submodules:

    git clone git@github.com:bdero/impeller-cmake-example.git --recursive
    
  2. Fetch non-submodule dependencies:

    cd impeller-cmake-example
    ./deps.sh
    

Developing with vscode

This repository contains configuration to make working with vscode easy out of the box (.vscode/settings.json and CMakePresets.json).

Note that ubiquitous tools like cmake and clangd do all of the heavy lifting here, and getting a good code completion/navigation experience is possible for any editor with clangd support (Emacs, Sublime, etc).

  1. Get clang:

    • Windows: Install Visual Studio 2022 and open the x64 Native Tools Command Prompt for VS 2022
    • macOS: Download LLVM (homebrew: brew install llvm)
  2. Install recommended vscode extensions:

    • CMake Tools (build using CMake presets)
    • clangd (accurate code completion and navigation)
  3. Open the root directory of this repository in vscode:

    code impeller-cmake-example
    
  4. Configure CMake (bottom bar).

    1. Select the active configure preset:
      • Windows: Ninja Debug VS2022
      • macOS: Ninja Debug
    2. Set the active build preset to Example debug.
    3. Set the default target to example.
  5. Build/debug/run and enjoy!