diff --git a/meson.build b/meson.build
index 1a0f194155a7..fa121a9fec2c 100644
--- a/meson.build
+++ b/meson.build
@@ -49,7 +49,6 @@ versions = {
 cc = meson.get_compiler('c')
 cc_native = meson.get_compiler(
   'c',
-  native : true,
 )
 if host_machine.system() == 'darwin' and not cc.has_header('stdio.h')
   # Certain compiler checks fail with -arch x86_64 -arch arm64, which could
diff --git a/src/meson.build b/src/meson.build
index 889fbb9224cc..5b76fbb13bdd 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,3 +1,6 @@
+if meson.is_cross_build()
+  openslide_tables_c = [ '../openslide-tables.c' ]
+else
 # generate openslide-tables.c
 make_tables = executable(
   'make-tables',
@@ -10,6 +13,7 @@ openslide_tables_c = custom_target(
   output : 'openslide-tables.c',
   command : [make_tables, '@OUTPUT@'],
 )
+endif
 
 # Windows resources
 openslide_dll_manifest = configure_file(
