spice-common/common
Eduardo Lima (Etrunko) 55070333f6 Add support for building with meson/ninja
In a comparison with current autotools build system, meson/ninja
provides a huge improvement in build speed, while keeping the same
functionalities currently available and being considered more user
friendly.

The new system coexists within the same repository with the current one,
so we can do more extensive testing of its functionality before deciding
if the old system can be removed, or for some reason, has to stay for
good.

- Meson: https://mesonbuild.com

  This is the equivalent of autogen/configure step in autotools. It
  generates the files that will be used by ninja to actually build the
  source code.

  The project has received lots of traction recently, with many GNOME
  projects willing to move to this new build system. The following wiki
  page has more details of the status of the many projects being ported:

    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

  Meson has a python-like syntax, easy to read, and the documentation
  on the project is very complete, with a dedicated page on how to port
  from autotools, explaining how most common use cases can be
  implemented using meson.

    http://mesonbuild.com/Porting-from-autotools.html

  Other important sources of information:

    http://mesonbuild.com/howtox.html
    http://mesonbuild.com/Syntax.html
    http://mesonbuild.com/Reference-manual.html

- Ninja: https://ninja-build.org

  Ninja is the equivalent of make in an autotools setup, which actually
  builds the source code. It has being used by large and complex
  projects such as Google Chrome, Android and LLVM. There is not much to
  say about ninja (other than it is much faster than make) because we
  won't interact directly with it as much, as meson does the middle man
  job here. The reasoning for creating ninja in the first place is
  explained on the following post:

    http://neugierig.org/software/chromium/notes/2011/02/ninja.html

  Also its manual provides more in-depth information about the design
  principles:

    https://ninja-build.org/manual.html

- Basic workflow:

  Meson package is available for most if not all distros, so, taking
  Fedora as an example, we only need to run:

    # dnf -y install meson ninja-build.

  With Meson, building in-tree is not possible at all, so we need to
  pass a directory as argument to meson where we want the build to be
  done. This has the advantage of creating builds with different options
  under the same parent directory, e.g.:

    $ meson ./build --prefix=/usr
    $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true

  After configuration is done, we call ninja to actually do the build.

    $ ninja -C ./build
    $ ninja -C ./build install

  Ninja defaults to parallel builds, and this can be changed with the -j
  flag.

    $ ninja -j 10 -C ./build

- Hacking:

  * meson.build: Mandatory for the project root and usually found under
                 each directory you want something to be built.

  * meson_options.txt: Options that can interfere with the result of the
                       build.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-06-01 21:27:04 +01:00
..
backtrace.c Remove headers that are included in spice_common.h 2016-01-07 12:46:42 +01:00
backtrace.h common/backtrace: for mingw32 no pipe/wait_pid, just disable 2012-03-20 15:25:55 +01:00
bitops.h Remove INLINE usage 2013-10-04 12:45:00 +02:00
canvas_base.c canvas: Use SPICE_UNALIGNED_CAST to avoid -Wcast-align warnings 2018-01-31 15:10:35 +00:00
canvas_base.h canvas: Remove unused include header 2018-01-18 14:34:26 +00:00
canvas_utils.c canvas: Unify __surface_create_stride and surface_create_stride 2018-01-18 14:34:24 +00:00
canvas_utils.h canvas: Remove unused include header 2018-01-18 14:34:26 +00:00
client_demarshallers.h build-sys: make it a seperately buildable spice-common library 2012-03-22 20:21:05 +01:00
client_marshallers.h Use explicit path for inclusion 2016-07-13 15:03:34 -03:00
draw.h draw: Add spice_image_descriptor_is_lossy 2016-01-20 15:56:00 +00:00
lines.c miLineArc(): initialize edge1, edge2 2018-05-10 10:05:41 -05:00
lines.h build-sys: make it a seperately buildable spice-common library 2012-03-22 20:21:05 +01:00
log.c log: Forbid the usage of obsolete SPICE_LOG_DOMAIN 2017-07-05 09:53:02 +01:00
log.h Add --enable-extra-checks option 2018-03-19 14:47:21 +00:00
lz_common.h ppc: Fix lz magic endianess 2015-07-02 13:31:28 +02:00
lz_compress_tmpl.c lz: Inline GET_{r,g,b} macros 2018-05-25 11:54:18 +01:00
lz_config.h common: use INLINE instead of inline 2012-03-20 15:25:53 +01:00
lz_decompress_tmpl.c lz: Simplify code 2018-01-18 10:08:43 +00:00
lz.c lz: Remove unused encode_level and only assigned io_start 2018-01-18 10:08:46 +00:00
lz.h Add printf format annotations to all '...' functions 2012-03-20 15:30:24 +01:00
macros.h Define a new SPICE_VERIFY macro 2016-11-14 17:19:18 +00:00
Makefile.am Add support for building with meson/ninja 2018-06-01 21:27:04 +01:00
marshaller.c marshaller: Remove initial underscore from static function 2018-05-21 13:34:58 +01:00
marshaller.h marshaller: Remove deprecated replacement functions 2016-12-08 13:49:13 +00:00
mem.c Avoid clang warnings on casts with stricter alignment requirements 2017-06-20 11:33:45 +02:00
mem.h Avoid clang warnings on casts with stricter alignment requirements 2017-06-20 11:33:45 +02:00
meson.build Add support for building with meson/ninja 2018-06-01 21:27:04 +01:00
messages.h messages: document limitation of id in StreamCreate 2018-05-05 13:00:56 +01:00
pixman_utils.c Remove headers that are included in spice_common.h 2016-01-07 12:46:42 +01:00
pixman_utils.h pixman_utils: Add macros for color byte ordering 2015-12-17 16:03:19 +01:00
quic_config.h Use SPICE_{BEGIN,END}_DECLS 2012-03-20 15:30:23 +01:00
quic_family_tmpl.c quic: Remove some too strict asserts in hot paths 2018-05-31 07:34:17 +01:00
quic_rgb_tmpl.c quic: Introduce CommonState *state variable in templates 2018-05-24 12:18:37 +01:00
quic_tmpl.c quic: Use channel->correlate_row in macros 2018-05-24 17:20:38 +01:00
quic.c quic: Remove some too strict asserts in hot paths 2018-05-31 07:34:17 +01:00
quic.h Remove deprecated init functions 2016-06-13 11:28:58 +01:00
rect.h Remove INLINE usage 2013-10-04 12:45:00 +02:00
region.c region: Avoid possible memory corruption 2017-02-28 15:26:54 +00:00
region.h Document REGION_TEST_* bitmasks 2017-02-03 11:07:32 -06:00
ring.h ring: Remove short living temporary variable 2017-11-07 13:11:19 +00:00
rop3.c use macro to define constructor function 2016-03-23 15:06:08 +00:00
rop3.h Remove deprecated init functions 2016-06-13 11:28:58 +01:00
snd_codec.c common: Fix -Wunused-variable 2014-10-23 14:54:48 +02:00
snd_codec.h Add support for the Opus codec. 2014-01-02 12:28:21 +01:00
spice_common.h Use a log handler to modify abort() behaviour 2012-03-20 15:30:23 +01:00
ssl_verify.c Fix build with LibreSSL 2018-01-23 10:23:43 +00:00
ssl_verify.h ssl_verify: Move wincrypt.h related #ifdef closer to the include 2015-03-26 10:15:04 +01:00
sw_canvas.c canvas: Remove dc parameter from SwCanvas::put_image 2018-01-18 14:34:19 +00:00
sw_canvas.h Remove deprecated init functions 2016-06-13 11:28:58 +01:00
verify.h Adjust verify.h licence 2016-06-21 12:26:38 +02:00