diff --git a/Boilerplate/jsonProcessor.lua b/Boilerplate/jsonProcessor.lua index aa95a44..e3d0b65 100644 --- a/Boilerplate/jsonProcessor.lua +++ b/Boilerplate/jsonProcessor.lua @@ -76,13 +76,13 @@ function JsonProcessor(info) local handleDllImportMaybe = function(this) if (this.info.isShared) then - defines(this.result.dllimport) + forEach(this.result.dllimport, defines) end end local handleDllExportMaybe = function(this) if (this.info.isShared) then - defines(this.result.dllexport) + forEach(this.result.dllexport, defines) end end @@ -124,6 +124,10 @@ function JsonProcessor(info) forEach(result.staticImport, defines) end + if (this.info.isStatic) then + forEach(result.staticImpDefines, defines) + end + handleInclude(this, false) defines(("_auhas_" .. this.result.name):upper() .. "=1") @@ -267,6 +271,7 @@ function JsonProcessor(info) forEach(object.depends, handleDepends, a, false) forEach(object["soft-depends"], handleDepends, a, true) forEach(object.impDefines, defines) + forEach(object.links, links) if (usingMSVC) then forEach(object.msvcIgnore, disablewarnings) end @@ -322,13 +327,17 @@ function JsonProcessor(info) forEach(result.impInclude, handleUserJsonInclude, info.path, true) if (a.info.projectType:lower() == "sharedlib") then - tryAddDefine(result.dllexport) + forEach(result.dllexport, defines) end end forEach(result.actions, handleAction, info.path) forEach(result.events, handleBuildEvent, info.path) + if (info.isStatic) then + forEach(result.staticImpDefines, defines) + end + end forEach(result.subprojs, function(subproj) diff --git a/JSON Schema.json b/JSON Schema.json index d58029b..35b66fd 100644 --- a/JSON Schema.json +++ b/JSON Schema.json @@ -68,6 +68,15 @@ }, "description": "adds a preprocessor definition to translation units linking against a shared project" }, + "staticImpDefines": + { + "type": ["array", "string"], + "items": + { + "type": "string" + }, + "description": "adds a preprocessor definition to translation units linking against or compiling a static project" + }, "impDefines":