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.."")
|
project (""..GameName.."")
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
language "C++"
|
language "C++"
|
||||||
|
cppdialect "C++17"
|
||||||
|
|
||||||
location ""
|
location ""
|
||||||
|
|
||||||
@@ -44,19 +45,35 @@ project (""..GameName.."")
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cppdialect "C++17"
|
|
||||||
|
|
||||||
|
|
||||||
filter "configurations:Debug"
|
filter "configurations:Debug"
|
||||||
defines { "DEBUG" }
|
defines { "DEBUG" }
|
||||||
symbols "On"
|
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"
|
filter "configurations:Release"
|
||||||
defines { "NDEBUG" }
|
defines { "NDEBUG" }
|
||||||
optimize "On"
|
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.
|
-- Opciones de Windows.
|
||||||
|
-------------------------------------------------
|
||||||
filter "system:windows"
|
filter "system:windows"
|
||||||
systemversion "latest"
|
systemversion "latest"
|
||||||
includedirs
|
includedirs
|
||||||
@@ -70,26 +87,10 @@ project (""..GameName.."")
|
|||||||
links { "opengl32.lib", "SDL2.lib", "SDL2main.lib", "SDL2_image.lib", "SDL2_ttf.lib" }
|
links { "opengl32.lib", "SDL2.lib", "SDL2main.lib", "SDL2_image.lib", "SDL2_ttf.lib" }
|
||||||
defines { "SDL_VIDEO_DRIVER_WINDOWS" }
|
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.
|
-- Opciones de Linux.
|
||||||
|
-------------------------------------------------
|
||||||
filter "system:linux"
|
filter "system:linux"
|
||||||
includedirs
|
includedirs
|
||||||
{
|
{
|
||||||
@@ -98,22 +99,3 @@ project (""..GameName.."")
|
|||||||
|
|
||||||
links { "SDL2", "SDL2main", "SDL2_image", "SDL2_ttf", "dl", "GL", "GLEW"}
|
links { "SDL2", "SDL2main", "SDL2_image", "SDL2_ttf", "dl", "GL", "GLEW"}
|
||||||
defines { "SDL_VIDEO_DRIVER_X11" }
|
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