From c5d6d6d6d76189b9b2937295709b85654780e9db Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 3 Jan 2023 00:24:59 +0200 Subject: [PATCH] Define a macro to indicate which component is being built This can be used in libraries to export or import functions across a DLL interface as appropriate. --- source/lib/component.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/lib/component.cpp b/source/lib/component.cpp index b98556c..2763909 100644 --- a/source/lib/component.cpp +++ b/source/lib/component.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "builder.h" #include "component.h" #include "sourcepackage.h" @@ -26,6 +27,7 @@ void Component::prepare() void Component::create_build_info() { BuildInfo final_build_info; + final_build_info.defines[toupper(name)+"_BUILD"] = "1"; const Package::Requirements &pkg_reqs = package.get_required_packages(); Package::Requirements direct_reqs = requires; -- 2.45.2