Skip to content

Building XPCE for SDL3 and Cairo

Jan Wielemaker edited this page May 29, 2025 · 4 revisions

General

  • Checkout the packages/xpce directory of the Prolog tree to the branch sdl
  • Install the dependencies, notably SDL3 and Cairo
  • Configure using cmake -DSDL=ON ...

Using the default setup, thus should work for first installation:

git clone https://github.com/SWI-Prolog/swipl-devel.git
cd swipl-devel
git submodule update --init
cd packages/xpce
git checkout sdl
cd ../..
mkdir build.sdl
cd build.sdl
../scripts/configure
ninja

To update

cd /path/to/swipl-devel
git pull
git submodule update
git packages/xpce
git checkout sdl
git pull
cd ../../build.sdl
ninja

Platform notes

Linux

Fedora 42 is the main development environment.

Dependencies

  • Fedora (42)
    • dnf install SDL3-devel SDL3_image-devel cairo-devel

MacOS

Compilation works on MacOS. There are several problems

  • Resizing the epilog terminal terminal sometimes causes memory errors. This is a bit weird as the Fedora version passes with ASAN enabled.
  • The terminal content writes over the scrollbar
  • The fonts look rather rough.

Dependencies

  • Macports
    • port install SDL3 SDL3_image cairo
Clone this wiki locally