From c0bd860254903398f4d87962142f458eec9458b2 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Thu, 25 Apr 2024 20:47:53 -0400 Subject: [PATCH] Attempting to detect windows to add the option you need. --- sfmldemo/meson.build | 22 ++++++++++++++-------- sfmldemo/reset_build.sh | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 sfmldemo/reset_build.sh diff --git a/sfmldemo/meson.build b/sfmldemo/meson.build index 4f59831..1f76f00 100644 --- a/sfmldemo/meson.build +++ b/sfmldemo/meson.build @@ -1,14 +1,20 @@ project('sfmldemo', 'cpp', - default_options: [ - 'default_library=static', - 'cpp_std=c++17', - ]) + default_options: ['cpp_std=c++17']) -sfml_dep = dependency('sfml') -imgui_dep = dependency('imgui-sfml') -fmt_dep = dependency('fmt') +if host_machine.system() == 'windows' + defaults = ['library_default=static'] +else + defaults = [] +endif + +dependencies = [ + dependency('sfml'), + dependency('imgui-sfml'), + dependency('fmt'), +] executable('sfmldemo', 'main.cpp', win_subsystem: 'windows', cpp_args: '-DFMT_HEADER_ONLY', - dependencies: [sfml_dep, imgui_dep, fmt_dep]) + override_options: defaults, + dependencies: dependencies) diff --git a/sfmldemo/reset_build.sh b/sfmldemo/reset_build.sh new file mode 100644 index 0000000..ac16c1b --- /dev/null +++ b/sfmldemo/reset_build.sh @@ -0,0 +1,17 @@ +mv ./subprojects/packagecache . +rm -rf ./subprojects ./builddir +mkdir subprojects +mv ./packagecache ./subprojects +mkdir builddir +meson wrap install flac +meson wrap install freetype2 +meson wrap install imgui-sfml +meson wrap install imgui +meson wrap install libpng +meson wrap install ogg +meson wrap install openal-soft +meson wrap install sfml +meson wrap install vorbis +meson wrap install zlib +meson wrap install fmt +meson setup builddir