feat: switched build system to premake (replacing SCons)
parent
b486f09939
commit
48b094c979
|
@ -5,3 +5,6 @@ game
|
|||
.gdb_history
|
||||
compile_commands.json
|
||||
.cache/
|
||||
build
|
||||
compile_commands
|
||||
Makefile
|
||||
|
|
26
SConstruct
26
SConstruct
|
@ -1,26 +0,0 @@
|
|||
from pathlib import Path
|
||||
import os
|
||||
|
||||
project='game'
|
||||
|
||||
def glob_recurse(dir):
|
||||
sources = Glob(os.path.join(dir, '*.cpp'))
|
||||
for path in dir.iterdir():
|
||||
if path.is_dir():
|
||||
sources.extend(glob_recurse(path))
|
||||
return sources
|
||||
|
||||
sources = glob_recurse(Path('src/'))
|
||||
|
||||
env = Environment(CCFLAGS=[
|
||||
'--std=c++23',
|
||||
'-fno-exceptions',
|
||||
'-Wall', '-Wpedantic', '-Wextra', '-Werror',
|
||||
'-O0', '-g3', '-Isrc',
|
||||
'-DPROJECTNAME=\\\"'+project+'\\\"',
|
||||
'-DDEBUG'
|
||||
],
|
||||
LINKFLAGS=[
|
||||
'-lSDL2', '-lSDL2_image', '-lm',
|
||||
])
|
||||
env.Program(project, sources)
|
|
@ -0,0 +1,23 @@
|
|||
workspace "game"
|
||||
configurations { "debug", "release" }
|
||||
location "."
|
||||
|
||||
project "game"
|
||||
kind "WindowedApp"
|
||||
language "c++"
|
||||
cppdialect "c++20"
|
||||
location "build/"
|
||||
files { "src/**.cpp" }
|
||||
includedirs { "src/" }
|
||||
links { "SDL2", "SDL2_image", "m" }
|
||||
targetdir "bin/"
|
||||
exceptionhandling "Off"
|
||||
filter "configurations:debug"
|
||||
defines { "DEBUG" }
|
||||
optimize "Off"
|
||||
symbols "On"
|
||||
filter "configurations:release"
|
||||
defines { "NDEBUG" }
|
||||
optimize "On"
|
||||
symbols "Off"
|
||||
postbuildcommands "{COPYDIR} ../resources %{cfg.targetdir}"
|
Loading…
Reference in New Issue