From: Mikko Rasa Date: Mon, 2 Jan 2023 22:24:59 +0000 (+0200) Subject: Define a macro to indicate which component is being built X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c5d6d6d6d76189b9b2937295709b85654780e9db;p=builder.git 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. --- 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;