Skip to content

Instantly share code, notes, and snippets.

@czak
Last active March 1, 2024 22:33
Show Gist options
  • Save czak/499ffd9bc54b6e8eadbe15623d8d99ef to your computer and use it in GitHub Desktop.
Save czak/499ffd9bc54b6e8eadbe15623d8d99ef to your computer and use it in GitHub Desktop.
Meson cross file for webos
[constants]
arch = 'arm-webos-linux-gnueabi'
toolchain = '/home/czak/projects/webos/webos-sdk-x86_64/1.0.g'
sysroot = toolchain / 'sysroots/armv7a-neon-webos-linux-gnueabi'
[host_machine]
system = 'webos-linux'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'
[binaries]
c = arch + '-gcc'
cpp = arch + '-g++'
strip = arch + '-strip'
pkgconfig = toolchain / 'sysroots/x86_64-webossdk-linux/usr/bin/pkg-config'
[properties]
sys_root = sysroot
[built-in options]
c_args = ['--sysroot=' + sysroot, '-march=armv7-a', '-mfpu=neon', '-mfloat-abi=softfp']
c_link_args = ['--sysroot=' + sysroot]
cpp_args = ['--sysroot=' + sysroot, '-march=armv7-a', '-mfpu=neon', '-mfloat-abi=softfp']
cpp_link_args = ['--sysroot=' + sysroot]
pkg_config_path = sysroot / 'usr/lib/pkgconfig' + ':' + sysroot / 'usr/share/pkgconfig'
@czak
Copy link
Author

czak commented Jan 22, 2022

To use this file, update the toolchain constant to point to your NDK installation path.

Then, you can configure your Meson-based build using:

$ meson setup builddir --cross-file path/to/this/file/webos

I tested this with Meson 0.61.1 under Linux.

I was able to successfully build com.sample.waylandegl using the following meson.build:

project('com.sample.waylandegl', 'c')

executable('wayland_egl', 'wayland_egl.c', dependencies: [
  dependency('wayland-webos-client'),
  dependency('wayland-egl'),
  dependency('glesv2'),
  dependency('egl'),
])

Read more at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment