|  | @@ -25,6 +25,7 @@ src = [
 | 
	
		
			
				|  |  |      'utils/Error.cpp',
 | 
	
		
			
				|  |  |      'utils/Logger.cpp',
 | 
	
		
			
				|  |  |      'utils/Random.cpp',
 | 
	
		
			
				|  |  | +    'utils/Utility.cpp',
 | 
	
		
			
				|  |  |  ]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  src_tests = [
 | 
	
	
		
			
				|  | @@ -61,7 +62,7 @@ src_tests = [
 | 
	
		
			
				|  |  |  ]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  compiler = meson.get_compiler('cpp')
 | 
	
		
			
				|  |  | -args = compiler.get_supported_arguments([
 | 
	
		
			
				|  |  | +error_args = compiler.get_supported_arguments([
 | 
	
		
			
				|  |  |      '-Wcast-align=strict', '-pedantic', '-Wmissing-declarations', '-Wdate-time', 
 | 
	
		
			
				|  |  |      '-Winit-self', '-Woverlength-strings', '-Wsign-promo', '-Wnon-virtual-dtor', 
 | 
	
		
			
				|  |  |      '-Wconversion', '-Woverloaded-virtual', '-Wdeprecated-enum-enum-conversion', 
 | 
	
	
		
			
				|  | @@ -75,9 +76,17 @@ args = compiler.get_supported_arguments([
 | 
	
		
			
				|  |  |      '-Wredundant-decls', '-Werror', '-Wsign-conversion', '-Walloca', '-Wshadow',
 | 
	
		
			
				|  |  |      '-Winvalid-pch', '-Wdeprecated-copy-dtor', '-Wundef', '-Wdouble-promotion',
 | 
	
		
			
				|  |  |      '-Warith-conversion', '-Wextra', '-Wtrivial-auto-var-init', '-Wlogical-op', 
 | 
	
		
			
				|  |  | -    '-Wall', '-Wenum-conversion',
 | 
	
		
			
				|  |  | +    '-Wall', '-Wenum-conversion'
 | 
	
		
			
				|  |  | +])
 | 
	
		
			
				|  |  | +compile_args = compiler.get_supported_arguments([
 | 
	
		
			
				|  |  | +    '-nostdinc++', '-fno-exceptions', '-fno-rtti', '-fno-threadsafe-statics'
 | 
	
		
			
				|  |  | +])
 | 
	
		
			
				|  |  | +link_args = compiler.get_supported_arguments([
 | 
	
		
			
				|  |  | +    '-nodefaultlibs', '-lc', '-lm'
 | 
	
		
			
				|  |  |  ])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +add_global_arguments('-DLODEPNG_NO_COMPILE_CPP', language : 'cpp')
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  cmake = import('cmake')
 | 
	
		
			
				|  |  |  glfw_proj = cmake.subproject('glfw')
 | 
	
		
			
				|  |  |  glfw_includes = glfw_proj.include_directories('glfw')
 | 
	
	
		
			
				|  | @@ -97,14 +106,19 @@ dl_dep = compiler.find_library('dl', required: false)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  gamingcore_include = [include_directories('.'), glfw_includes, glew_includes]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -lodepng = static_library('lodepng', sources: 'libs/lodepng/lodepng.cpp')
 | 
	
		
			
				|  |  | +lodepng = static_library('lodepng', 
 | 
	
		
			
				|  |  | +    sources: 'libs/lodepng/lodepng.cpp',
 | 
	
		
			
				|  |  | +    cpp_args: compile_args,
 | 
	
		
			
				|  |  | +    link_args: link_args)
 | 
	
		
			
				|  |  |  lodepng_dep = declare_dependency(link_with: lodepng)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  gamingcore = static_library('gamingcore', 
 | 
	
		
			
				|  |  |      sources: src,
 | 
	
		
			
				|  |  |      include_directories: gamingcore_include,
 | 
	
		
			
				|  |  |      dependencies: [thread_dep, glfw_dep, glew_dep, gl_dep, ws2_32_dep, winmm_dep, glu_dep, dl_dep, glu_dep, lodepng_dep],
 | 
	
		
			
				|  |  | -    cpp_args: args)
 | 
	
		
			
				|  |  | +    cpp_args: error_args + compile_args,
 | 
	
		
			
				|  |  | +    link_args: link_args)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  gamingcore_dep = declare_dependency(
 | 
	
		
			
				|  |  |      include_directories: gamingcore_include,
 | 
	
		
			
				|  |  |      link_with: gamingcore)
 | 
	
	
		
			
				|  | @@ -112,4 +126,5 @@ gamingcore_dep = declare_dependency(
 | 
	
		
			
				|  |  |  executable('tests', 
 | 
	
		
			
				|  |  |      sources: src_tests,
 | 
	
		
			
				|  |  |      dependencies: gamingcore_dep,
 | 
	
		
			
				|  |  | -    cpp_args: args + ['-DLOG_LEVEL=4'])
 | 
	
		
			
				|  |  | +    cpp_args: error_args + compile_args + ['-DLOG_LEVEL=4'],
 | 
	
		
			
				|  |  | +    link_args: link_args)
 |