• Petri Latvala's avatar
    meson: Add options to control optional parts · 0e98bf69
    Petri Latvala authored
    Distributions want explicit control over optional parts so they can
    state runtime dependencies before building. Let's restore the
    functionality autotools used to provide.
    
    Where possible, the selection is done by choosing whether to build a
    particular item and the option name is build_$item. Example:
    build_overlay. Where not possible, the option name is
    with_$item. Example: with_valgrind.
    
    Array options require a bump of required meson version to 0.44. Debian
    stable has meson 0.37 which is already too old, stable-backports has
    0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a
    perspective.
    
    Note, the old hack for not building docs when cross-compiling is
    gone, as doc building can be explicitly controlled now.
    
    v2: glib not optional
    v3: bump meson version to 0.44
    Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
    Cc: Matt Turner <mattst88@gmail.com>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Eric Anholt <eric@anholt.net>
    Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
    Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
    Reviewed-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    0e98bf69
meson.build 2.9 KB