Skip to content
Snippets Groups Projects

Draft: Cleaner build files

Open Joakim Borge Hunskår requested to merge cleaner-build-files into main
1 file
+ 1
10
Compare changes
  • Side-by-side
  • Inline
@@ -5,18 +5,9 @@ project('GUI Project', 'cpp',
'c_std=c17',
'default_library=static'])
# Windows compilation has no pre-packaged SDL2 available, and compilation takes a while.
# If you want to compile from source, remove everything but the contents of the else clause.
if host_machine.system() == 'windows'
sdl2_dep = subproject('sdl2_windows').get_variable('sdl2_windows_dep')
else
sdl2_dep = dependency('sdl2')
endif
animationwindow_dep = dependency('animationwindow', fallback: ['animationwindow', 'animationwindow_dep'])
std_lib_facilities_dep = dependency('std_lib_facilities', fallback: ['std_lib_facilities', 'std_lib_facilities_dep'])
if host_machine.system() == 'linux'
compiler_flags = ['-Wconversion', '-fdiagnostics-color=always', '-Werror=return-type']
else
@@ -25,4 +16,4 @@ endif
src = ['main.cpp']
exe = executable('program', src, dependencies : [animationwindow_dep, sdl2_dep, std_lib_facilities_dep], cpp_args : compiler_flags)
exe = executable('program', src, dependencies : [animationwindow_dep, std_lib_facilities_dep], cpp_args : compiler_flags)
Loading