From 7063ed6e32510b74f9bcd9dd74405d4383326134 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 22 Mar 2019 22:00:19 -0400 Subject: [PATCH] Take some suggestions from the meson IRC channel: don't set unnecessary variables before project(); don't disallow plain builds since the options that meson doesn't apply aren't any of the ones I care about. --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 18fe4382..4b0caefd 100644 --- a/meson.build +++ b/meson.build @@ -11,11 +11,8 @@ # I'd also like to be able to omit the library's dependency libraries in the executables if building a shared library, as those are not required in that case; I'd need to require them in a static library. # And for Windows, the shared library (but not shared executables) needs an additional resource file, and the static executables (but not the static library) need a *different* resource file. (Windows static libraries can't contain resources anyway; the linkers will just ignore the resource objects.) -libui_OS = target_machine.system() -libui_MSVC = meson.get_compiler('c').get_id() == 'msvc' - libui_default_options = [ - 'buildtype=debug', # build debug by default (TODO: disallow plain?) + 'buildtype=debug', # build debug by default 'default_library=shared', # build shared libraries by default ] # TODO switch to tabs; the spaces are just so I can share this file while I'm writing it @@ -45,6 +42,9 @@ foreach name, value : libui_forced_options endif endforeach +libui_OS = target_machine.system() +libui_MSVC = meson.get_compiler('c').get_id() == 'msvc' + libui_mode = get_option('default_library') if libui_mode == 'both' error('sorry, but libui does not support building both shared and static libraries at the same time, because Windows resource file rules differ between the two')