Skip to content

Instantly share code, notes, and snippets.

@startergo
Last active April 8, 2025 14:53
Show Gist options
  • Save startergo/79dc1991df8b8cf720b110b09fa7d7f0 to your computer and use it in GitHub Desktop.
Save startergo/79dc1991df8b8cf720b110b09fa7d7f0 to your computer and use it in GitHub Desktop.
Install Virgl Angle headers systemwide

Copy headers to system includes (requires admin privileges)

sudo cp -r angle/include/* /usr/local/include/

Copy pkg-config files:

mkdir -p /usr/local/lib/pkgconfig/
cp angle/egl.pc /usr/local/lib/pkgconfig/
cp angle/glesv2.pc /usr/local/lib/pkgconfig/

For Homebrew:

cp -r angle/include/* $(brew --prefix)/include/
cp angle/egl.pc $(brew --prefix)/lib/pkgconfig/
cp angle/glesv2.pc $(brew --prefix)/lib/pkgconfig/

To install the correct pkg-config files:

Create the files:

cat > egl.pc << 'EOF'
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: EGL
Description: EGL library and headers
Version: 1.5
Requires.private: 
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}
EOF
cat > glesv2.pc << 'EOF'
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: GLESv2
Description: OpenGL ES v2 library and headers
Version: 2.0
Requires.private:
Libs: -L${libdir} -lGLESv2
Cflags: -I${includedir}
EOF

Install them (may require sudo):

sudo mkdir -p /usr/local/lib/pkgconfig/
sudo cp egl.pc glesv2.pc /usr/local/lib/pkgconfig/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment