# It turns out that I wouldn't really need any custom options; go figure.
# I'm not sure how to allow building 32-bit instead of 64-bit with meson.
# I'd also like all the outputs to appear in a folder out/ in the build folder.
# 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.)
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')
# don't use /analyze; that requires us to write annotations everywhere
# TODO undecided flags from qo?
# the RTC flags are only supplied in debug builds because they are only supposed to be used by debug builds (see "This is because run-time error checks are not valid in a release (optimized) build." in https://docs.microsoft.com/cpp/build/reference/rtc-run-time-error-checks)
# /RTCc is not supplied because it's discouraged as of VS2015; see https://www.reddit.com/r/cpp/comments/46mhne/rtcc_rejects_conformant_code_with_visual_c_2015/d06auq5
# TODO add these compiler flags (assuming meson doesn't provide an alternate method for these, which I know it does for EHsc):
# /wd4100 (equivalent of -Wno-unused-parameter)
# /bigobj /nologo
# $<$<CONFIG:Debug>:/RTC1 /RTCs /RTCu>
# TODO add these linker flags (for each: maybe? depends on whether meson does this itself)