From e67b8501bf5e71a5aa453ec75f8a6faf65cc1213 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Wed, 20 Feb 2019 16:05:46 -0800 Subject: WIN32: Fix embedding disabled engine files Fix Windows builds (msvc and mingw) including data files from disabled engines as embedded resources in executable. Bug #10878 --- base/internal_plugins.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 base/internal_plugins.h (limited to 'base/internal_plugins.h') diff --git a/base/internal_plugins.h b/base/internal_plugins.h new file mode 100644 index 0000000000..1af1607022 --- /dev/null +++ b/base/internal_plugins.h @@ -0,0 +1,19 @@ +#if !defined(INCLUDED_FROM_BASE_PLUGINS_H) && !defined(RC_INVOKED) +#error This file may only be included by base/plugins.h or dists/scummvm.rc +#endif + +// plugin macros are defined in this simple internal header so that scummvm.rc +// can include them without causing problems for Windows resource compilers. + +#define STATIC_PLUGIN 1 +#define DYNAMIC_PLUGIN 2 + +#define PLUGIN_ENABLED_STATIC(ID) \ + (ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID)) + +#ifdef DYNAMIC_MODULES + #define PLUGIN_ENABLED_DYNAMIC(ID) \ + (ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN)) +#else + #define PLUGIN_ENABLED_DYNAMIC(ID) 0 +#endif -- cgit v1.2.3