Had to bring back the static options so that meson actually builds it as static.

This commit is contained in:
Zed A. Shaw 2026-04-03 12:15:25 -04:00
parent c14e244084
commit 514bfec0ea
2 changed files with 19 additions and 7 deletions

View file

@ -1,5 +1,5 @@
project('raycaster', 'cpp',
project('under_the_dome', 'cpp',
version: '0.1.0',
default_options: [
'cpp_std=c++23',
@ -22,6 +22,14 @@ cc = meson.get_compiler('cpp')
dependencies = []
if build_machine.system() == 'windows'
add_global_link_arguments(
'-static-libgcc',
'-static-libstdc++',
'-static',
'-flto',
language: 'cpp',
)
sfml_main = subproject('sfml').get_variable('sfml_main_dep')
opengl32 = cc.find_library('opengl32', required: true)
winmm = cc.find_library('winmm', required: true)
@ -33,6 +41,10 @@ if build_machine.system() == 'windows'
exe_defaults += ['werror=true']
elif build_machine.system() == 'darwin'
add_global_link_arguments(
language: 'cpp',
)
opengl = dependency('OpenGL')
corefoundation = dependency('CoreFoundation')
carbon = dependency('Carbon')
@ -97,7 +109,7 @@ executable('runtests', sources + tests,
override_options: exe_defaults,
dependencies: dependencies + [catch2])
executable('zedcaster',
executable('under_the_dome',
[ 'src/main.cpp' ],
cpp_args: cpp_args,
link_args: link_args,