From 69fbc1c7558bf8ee83da8aeb9bf4b46bb7b09941 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Tue, 11 Jul 2023 18:05:58 +0100
Subject: [PATCH] test: Copy compile definitions from the shared library
Otherwise we won't have the definitions like -DLOAD_BMP that tell us
whether each format is meant to be supported, which this test needs
to know.
Signed-off-by: Simon McVittie <smcv@debian.org>
---
test/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 29bcc8ac..9dcc3ac3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -65,6 +65,7 @@ set(TESTS_ENVIRONMENT
foreach(prog IN LISTS ALL_TESTS)
target_compile_definitions(${prog} PRIVATE
+ $<TARGET_PROPERTY:${sdl3_image_target_name},COMPILE_DEFINITIONS>
"SDL_IMAGE_SAVE_JPG=$<BOOL:${SDL3IMAGE_JPG_SAVE}>"
"SDL_IMAGE_SAVE_PNG=$<BOOL:${SDL3IMAGE_PNG_SAVE}>"
)