feat: windows builds in premake
This commit is contained in:
		
							parent
							
								
									1cfe4bc4c3
								
							
						
					
					
						commit
						f22927e124
					
				
							
								
								
									
										15
									
								
								premake5.lua
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								premake5.lua
									
									
									
									
									
								
							|  | @ -1,5 +1,6 @@ | |||
| workspace "roguelike" | ||||
|     configurations { "debug", "release" } | ||||
|     platforms { "linux", "windows" } | ||||
|     location "." | ||||
| 
 | ||||
| project "roguelike" | ||||
|  | @ -9,12 +10,10 @@ project "roguelike" | |||
|     location "build/" | ||||
|     buildinputs "../resources/**.*" | ||||
|     buildoutputs "%{cfg.targetdir}/resources/**.*" | ||||
|     postbuildcommands "{COPYDIR} ../resources %{cfg.targetdir}" | ||||
|     files { "src/**.cpp", "vendor/**.cpp" } | ||||
|     includedirs { "src/", "vendor/" } | ||||
|     links { "SDL2", "SDL2_image", "m", "SDL2_ttf" } | ||||
|     targetdir "bin/" | ||||
|     exceptionhandling "Off" | ||||
|     includedirs { "src/", "libs/SDL2/include/", "libs/SDL2_image/include/", "libs/SDL2/include/SDL2/" } | ||||
|     filter "configurations:debug" | ||||
|         defines { "DEBUG" } | ||||
|         optimize "Off" | ||||
|  | @ -23,3 +22,13 @@ project "roguelike" | |||
|         defines { "NDEBUG" } | ||||
|         optimize "On" | ||||
|         symbols "Off" | ||||
|     filter "platforms:linux" | ||||
|         postbuildcommands { "{COPYDIR} ../resources %{cfg.targetdir}" } | ||||
|         includedirs { "src/", "vendor/" } | ||||
|         links { "SDL2", "SDL2_image", "m" } | ||||
|     filter "platforms:windows" | ||||
|         libdirs { "libs/SDL2/lib/", "libs/SDL2/bin/", "libs/SDL2_image/lib/", "libs/SDL2_image/bin/" } | ||||
|         links { "stdc++:static", "gcc:static", "winpthread:static", "mingw32:static", "SDL2main", "SDL2_image", "SDL2" } | ||||
|         buildoptions { "-mwindows", "-static-libgcc", "-static-libstdc++" } | ||||
|         prebuildcommands { "{COPY} ../libs/SDL2_image/bin/SDL2_image.dll %{cfg.targetdir}", "{COPY} ../libs/SDL2/bin/SDL2.dll %{cfg.targetdir}", "{COPY} ../libs/SDL2/lib/libSDL2main.a %{cfg.targetdir}" } | ||||
|         postbuildcommands { "{COPYDIR} ../resources %{cfg.targetdir}" } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Sara
						Sara