11project (' galaxy_visualization_raylib' , ' c' ,
2- version : ' 0.5.1 ' ,
2+ version : ' 0.5.2 ' ,
33 default_options : [
44 ' c_std=c99' ,
55
@@ -13,15 +13,18 @@ project('galaxy_visualization_raylib', 'c',
1313 ' warning_level=3' ,
1414 ' c_args=-Wall' ,
1515 ' c_args=-Wextra' ,
16- ' c_args=-Werror' ,
1716 ' c_args=-Wpedantic' ,
1817 ]
1918)
2019
2120raylib_static = get_option (' raylib_static' )
2221
2322if raylib_static
24- raylib_sub = subproject (' raylib' )
23+ raylib_sub = subproject (' raylib' , default_options : [
24+ ' warning_level=0' ,
25+ ' werror=false' ,
26+ ' c_args=-w' ,
27+ ])
2528 raylib_dep = raylib_sub.get_variable (' raylib_dep' )
2629else
2730 raylib_dep = dependency (' raylib' , required : true , static : false )
@@ -35,6 +38,12 @@ if host_machine.system() != 'windows'
3538 platform_c_args += [' -march=native' ]
3639endif
3740
41+ extra_c_args += [' -Werror' ]
42+
43+ if host_machine .system() == ' windows'
44+ extra_c_args += [' -Wno-error=type-limits' ]
45+ endif
46+
3847# Generate embedded asset headers at configure time
3948if embed_assets
4049 message (' EMBED_ASSETS enabled - generating embedded headers...' )
@@ -48,8 +57,37 @@ sources = [
4857 ' src/unity_build.c' ,
4958]
5059
60+ if host_machine .system() == ' windows'
61+ magick_prog = find_program (' magick' , ' convert' , required : true )
62+ icon_resources = custom_target (
63+ ' app_icon_resources' ,
64+ input : files (' assets/images/app_icon.png' ),
65+ output : [' app_icon.ico' , ' app.rc' ],
66+ command : [
67+ ' bash' ,
68+ meson .project_source_root() / ' scripts/generate_windows_icon_resources.sh' ,
69+ ' @INPUT@' ,
70+ ' @OUTDIR@' ,
71+ magick_prog,
72+ ],
73+ build_by_default : true ,
74+ )
75+
76+ windows_mod = import (' windows' )
77+ sources += windows_mod.compile_resources(icon_resources[1 ])
78+ endif
79+
80+ platform_label = host_machine .system()
81+ if platform_label == ' windows'
82+ platform_label = ' Win64'
83+ elif platform_label == ' linux'
84+ platform_label = ' Linux'
85+ endif
86+
87+ exe_name = ' Galaxy_Visualization_' + platform_label + ' _v' + meson .project_version()
88+
5189exe = executable (
52- ' galaxy_visualization_raylib ' ,
90+ exe_name,
5391 sources,
5492 dependencies : raylib_dep,
5593 c_args : [
0 commit comments