From 2ac1a58d5e36567d2d59f20962deac226810b384 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 17 Aug 2021 18:24:15 +0200 Subject: [PATCH] sys: Fix resource embedding on macos --- plugins/libimhex/source/resources.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/libimhex/source/resources.cpp b/plugins/libimhex/source/resources.cpp index c3e286e3d..23349322a 100644 --- a/plugins/libimhex/source/resources.cpp +++ b/plugins/libimhex/source/resources.cpp @@ -11,7 +11,20 @@ ".align 8\n" \ ) -#else +#elif defined(OS_MACOS) + + #define RESOURCE(name, path) __asm__ ( \ + ".data;\n" \ + ".global " #name ";\n" \ + ".global " #name "_size;\n" \ + #name ":\n" \ + ".incbin \"" path "\";\n" \ + #name "_size:\n" \ + ".int " #name "_size - " #name ";\n" \ + ".align 8;\n" \ + ) + +#elif defined(OS_LINUX) #define RESOURCE(name, path) __asm__ ( \ ".section .rodata\n" \