|
@@ -1,4 +1,4 @@
|
|
|
-project('gamingcore', 'cpp', default_options : ['default_library=static'])
|
|
|
+project('gamingcore', 'cpp', default_options : ['default_library=static', 'cpp_std=c++17'])
|
|
|
|
|
|
src = [
|
|
|
'io/ImageReader.cpp',
|
|
@@ -25,7 +25,6 @@ src = [
|
|
|
'utils/Error.cpp',
|
|
|
'utils/Logger.cpp',
|
|
|
'utils/Random.cpp',
|
|
|
- 'libs/lodepng/lodepng.cpp',
|
|
|
]
|
|
|
|
|
|
src_tests = [
|
|
@@ -62,7 +61,22 @@ src_tests = [
|
|
|
]
|
|
|
|
|
|
compiler = meson.get_compiler('cpp')
|
|
|
-args = compiler.get_supported_arguments(['-Wall', '-Wextra', '-pedantic', '-Werror'])
|
|
|
+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',
|
|
|
+ '-Wdisabled-optimization', '-Winvalid-imported-macros', '-Wduplicated-cond',
|
|
|
+ '-Wdeprecated-enum-float-conversion', '-Wduplicated-branches', '-Wformat=2',
|
|
|
+ '-Wmissing-braces', '-Wsuggest-override', '-Wcast-qual', '-Wbidi-chars=any',
|
|
|
+ '-Wzero-as-null-pointer-constant', '-pedantic-errors', '-Wnull-dereference',
|
|
|
+ '-Wformat-signedness', '-Wfloat-equal', '-Wvolatile', '-Wctor-dtor-privacy',
|
|
|
+ '-Winfinite-recursion', '-Wshift-overflow=2', '-Wmultichar', '-Walloc-zero',
|
|
|
+ '-Wcomma-subscript', '-Wold-style-cast', '-Wwrite-strings', '-Wswitch-enum',
|
|
|
+ '-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',
|
|
|
+])
|
|
|
|
|
|
cmake = import('cmake')
|
|
|
glfw_proj = cmake.subproject('glfw')
|
|
@@ -83,16 +97,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_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],
|
|
|
+ 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)
|
|
|
gamingcore_dep = declare_dependency(
|
|
|
- include_directories : gamingcore_include,
|
|
|
+ include_directories: gamingcore_include,
|
|
|
link_with: gamingcore)
|
|
|
|
|
|
executable('tests',
|
|
|
sources: src_tests,
|
|
|
- dependencies : gamingcore_dep,
|
|
|
+ dependencies: gamingcore_dep,
|
|
|
cpp_args: args + ['-DLOG_LEVEL=4'])
|