Optimizaciones y mejoras de Premake.
Cambiar un par de cosas y hacer abstractos los postbuildcommands.
This commit is contained in:
+20
-38
@@ -13,6 +13,7 @@ workspace (""..GameName.."")
|
||||
project (""..GameName.."")
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
cppdialect "C++17"
|
||||
|
||||
location ""
|
||||
|
||||
@@ -44,19 +45,35 @@ project (""..GameName.."")
|
||||
|
||||
}
|
||||
|
||||
cppdialect "C++17"
|
||||
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines { "DEBUG" }
|
||||
symbols "On"
|
||||
postbuildcommands
|
||||
{
|
||||
"{COPYDIR} UberEngine/vendor/SDL/lib/x64/*.dll bin/Debug/",
|
||||
"{COPYDIR} UberEngine/vendor/SDL2_image/lib/x64/*.dll bin/Debug/",
|
||||
"{COPYDIR} UberEngine/vendor/SDL2_ttf/lib/x64/*.dll bin/Debug/",
|
||||
"{COPYDIR} resources/ bin/Debug/resources/"
|
||||
}
|
||||
|
||||
|
||||
filter "configurations:Release"
|
||||
defines { "NDEBUG" }
|
||||
optimize "On"
|
||||
postbuildcommands
|
||||
{
|
||||
"{COPYDIR} UberEngine/vendor/SDL/lib/x64/*.dll bin/Release/",
|
||||
"{COPYDIR} UberEngine/vendor/SDL2_image/lib/x64/*.dll bin/Release/",
|
||||
"{COPYDIR} UberEngine/vendor/SDL2_ttf/lib/x64/*.dll bin/Release/",
|
||||
"{COPYDIR} resources/ bin/Release/resources/"
|
||||
}
|
||||
|
||||
|
||||
-------------------------------------------------
|
||||
-- Opciones de Windows.
|
||||
-------------------------------------------------
|
||||
filter "system:windows"
|
||||
systemversion "latest"
|
||||
includedirs
|
||||
@@ -70,26 +87,10 @@ project (""..GameName.."")
|
||||
links { "opengl32.lib", "SDL2.lib", "SDL2main.lib", "SDL2_image.lib", "SDL2_ttf.lib" }
|
||||
defines { "SDL_VIDEO_DRIVER_WINDOWS" }
|
||||
|
||||
filter { "system:windows", "configurations:Debug" }
|
||||
postbuildcommands
|
||||
{
|
||||
"xcopy UberEngine\\vendor\\SDL\\lib\\x64\\*.dll bin\\Debug\\ /y /f",
|
||||
"xcopy UberEngine\\vendor\\SDL2_image\\lib\\x64\\*.dll bin\\Debug\\ /y /f",
|
||||
"xcopy UberEngine\\vendor\\SDL2_ttf\\lib\\x64\\*.dll bin\\Debug\\ /y /f",
|
||||
"xcopy resources\\ bin\\Debug\\resources\\ /e /y /f"
|
||||
}
|
||||
|
||||
|
||||
filter { "system:windows", "configurations:Release" }
|
||||
postbuildcommands
|
||||
{
|
||||
"xcopy UberEngine\\vendor\\SDL\\lib\\x64\\*.dll bin\\Release\\ /y /f",
|
||||
"xcopy UberEngine\\vendor\\SDL2_image\\lib\\x64\\*.dll bin\\Release\\ /y /f",
|
||||
"xcopy UberEngine\\vendor\\SDL2_ttf\\lib\\x64\\*.dll bin\\Release\\ /y /f",
|
||||
"xcopy resources\\ bin\\Release\\resources\\ /e /y /f"
|
||||
}
|
||||
|
||||
-------------------------------------------------
|
||||
-- Opciones de Linux.
|
||||
-------------------------------------------------
|
||||
filter "system:linux"
|
||||
includedirs
|
||||
{
|
||||
@@ -98,22 +99,3 @@ project (""..GameName.."")
|
||||
|
||||
links { "SDL2", "SDL2main", "SDL2_image", "SDL2_ttf", "dl", "GL", "GLEW"}
|
||||
defines { "SDL_VIDEO_DRIVER_X11" }
|
||||
|
||||
filter { "system:linux", "configurations:Debug" }
|
||||
postbuildcommands
|
||||
{
|
||||
-- "cp UberEngine/vendor/SDL/lib/x64/*.dll bin/Debug/",
|
||||
-- "cp UberEngine/vendor/SDL2_image/lib/x64/*.dll bin/Debug/",
|
||||
-- "cp UberEngine/vendor/SDL2_ttf/lib/x64/*.dll bin/Debug/",
|
||||
"cp -r resources/ bin/Debug/resources/"
|
||||
}
|
||||
|
||||
|
||||
filter { "system:linux", "configurations:Release" }
|
||||
postbuildcommands
|
||||
{
|
||||
-- "cp UberEngine/vendor/SDL/lib/x64/*.dll bin/Release/",
|
||||
-- "cp UberEngine/vendor/SDL2_image/lib/x64/*.dll bin/Release/",
|
||||
-- "cp UberEngine/vendor/SDL2_ttf/lib/x64/*.dll bin/Release/",
|
||||
"cp -r resources/ bin/Release/resources/"
|
||||
}
|
||||
Reference in New Issue
Block a user