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.
This commit is contained in:
parent
1a9b0881bc
commit
7063ed6e32
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue