diff --git a/tests/fp/meson.build b/tests/fp/meson.build
index 8bd0979f67eb875d6a15f75ab1f0809ee28912f4..2b4f00b9165c691a84fd7b1731f07714476559cc 100644
--- a/tests/fp/meson.build
+++ b/tests/fp/meson.build
@@ -1,3 +1,6 @@
+if 'CONFIG_TCG' not in config_all
+  subdir_done()
+endif
 # There are namespace pollution issues on Windows, due to osdep.h
 # bringing in Windows headers that define a FLOAT128 type.
 if targetos == 'windows'