From 14739bafa06878280e4e9955d128a7f9e374b741 Mon Sep 17 00:00:00 2001 From: Mohit Sethi Date: Fri, 10 Mar 2023 11:50:35 +0530 Subject: [PATCH] [BuildConfig] Use BinDir.Mono for copying files --- Arc-Editor/premake5.lua | 6 +++--- Arc/premake5.lua | 6 +++--- premake5.lua | 11 ++++++++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Arc-Editor/premake5.lua b/Arc-Editor/premake5.lua index 97e1eee3..23537e6e 100644 --- a/Arc-Editor/premake5.lua +++ b/Arc-Editor/premake5.lua @@ -84,7 +84,7 @@ project "Arc-Editor" symbols "on" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Debug/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } filter "configurations:Release" @@ -93,7 +93,7 @@ project "Arc-Editor" optimize "speed" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Release/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } filter "configurations:Dist" @@ -103,5 +103,5 @@ project "Arc-Editor" symbols "off" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Release/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } diff --git a/Arc/premake5.lua b/Arc/premake5.lua index d2398033..ea3f6dfe 100644 --- a/Arc/premake5.lua +++ b/Arc/premake5.lua @@ -102,7 +102,7 @@ project "Arc" symbols "on" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Debug/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } filter "configurations:Release" @@ -111,7 +111,7 @@ project "Arc" optimize "speed" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Release/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } filter "configurations:Dist" @@ -121,5 +121,5 @@ project "Arc" symbols "off" postbuildcommands { - '{COPY} "../Arc/vendor/mono/bin/Release/mono-2.0-sgen.dll" "%{cfg.targetdir}"', + '{COPY} "%{BinDir.Mono}/mono-2.0-sgen.dll" "%{cfg.targetdir}"', } diff --git a/premake5.lua b/premake5.lua index 93c8938f..5d622947 100644 --- a/premake5.lua +++ b/premake5.lua @@ -52,7 +52,16 @@ filter "configurations:Release" LibDir["Mono"] = "%{wks.location}/Arc/vendor/mono/lib/Release" filter "configurations:Dist" LibDir["Mono"] = "%{wks.location}/Arc/vendor/mono/lib/Release" - + +-- Bin directories relavtive to root folder (solution directory) +BinDir = {} +filter "configurations:Debug" + BinDir["Mono"] = "%{wks.location}/Arc/vendor/mono/bin/Debug" +filter "configurations:Release" + BinDir["Mono"] = "%{wks.location}/Arc/vendor/mono/bin/Release" +filter "configurations:Dist" + BinDir["Mono"] = "%{wks.location}/Arc/vendor/mono/bin/Release" + outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"; -- Include directories relavtive to root folder (solution directory)