spice/server
Eduardo Lima (Etrunko) 495d1612c4 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>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-08-30 11:10:45 -03:00
..
tests Add support for building with meson/ninja 2018-08-30 11:10:45 -03:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
agent-msg-filter.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.tmpl.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
char-device.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
char-device.h stream-device: Separate declaration in a separate header 2018-03-08 10:58:46 +00:00
common-graphics-channel.c common-graphics-channel: Use manual flushing on stream to decrease packet fragmentation 2018-04-17 15:45:39 +01:00
common-graphics-channel.h common-graphics-channel: Move "qxl" property to DisplayChannel 2017-09-07 06:42:01 +01:00
cursor-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel.c cursor: Rename cursor_marshall to red_marshall_cursor 2018-04-16 11:46:32 +02:00
cursor-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
dcc-private.h Rename StreamAgent to VideoStreamAgent 2017-11-30 11:51:09 -06:00
dcc-send.c Rename SpiceHead::id to monitor_id in the protocol 2018-07-18 08:17:13 +01:00
dcc.c build: Fix build from tarballs 2018-08-09 11:27:47 +01:00
dcc.h Use "base" as pipe item base field name 2018-06-18 13:40:51 +01:00
demarshallers.h Unify header guards 2017-03-30 18:17:20 +01:00
dispatcher.c build: Remove unneeded spice_common.h includes 2018-07-06 07:06:34 +01:00
dispatcher.h Add possibly missing headers for pthread.h 2018-06-26 10:54:01 +01:00
display-channel-private.h Use "base" as pipe item base field name 2018-06-18 13:40:51 +01:00
display-channel.c Do not use bzero 2018-06-25 13:12:04 +01:00
display-channel.h Reduce dependencies from red-qxl.h 2017-12-01 22:19:31 +00:00
display-limits.h display-channel: Limit number of surfaces to 1024 2018-01-08 09:59:59 +00:00
event-loop.c event-loop: Avoid possible compiler warning 2018-05-10 22:30:52 +01:00
glib-compat.h Use verify instead of G_STATIC_ASSERT 2017-12-01 22:49:46 +00:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c glz: Inline GET_{r,g,b} macros 2018-06-27 16:46:52 +01:00
glz-encoder-dict.c glz-encoder-dict: Remove a warning compiling with CentOS 7 2018-07-11 10:22:36 +01:00
glz-encoder-dict.h Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-priv.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encoder.c glz-encoder: Avoid double byte swap sending image magic 2018-06-05 14:13:27 +01:00
glz-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
gstreamer-encoder.c gstreamer-encoder: Use GLib memory functions 2017-10-11 12:52:17 +01:00
image-cache.c Use constant variables for image operations 2017-11-08 15:23:49 +00:00
image-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
image-encoders.c dcc: Rework COMPRESS_DEBUG macro 2018-07-23 12:01:09 +02:00
image-encoders.h Add possibly missing headers for pthread.h 2018-06-26 10:54:01 +01:00
inputs-channel-client.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
inputs-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
inputs-channel.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
inputs-channel.h inputs-channel: Move spice_server_kbd_leds to InputsChannel 2017-12-19 16:29:41 +00:00
jpeg-encoder.c jpeg-encoder: Remove JPEG_IMAGE_TYPE_RGB24 2018-06-26 18:06:50 +01:00
jpeg-encoder.h jpeg-encoder: Remove JPEG_IMAGE_TYPE_RGB24 2018-06-26 18:06:50 +01:00
lz4-encoder.c Avoid some alignment warnings using clang 2018-01-31 13:35:46 +00:00
lz4-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
main-channel-client.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
main-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-channel.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
main-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-dispatcher.c MainDispatcher: use correct argument type 2017-09-07 10:22:15 -05:00
main-dispatcher.h Unify header guards 2017-03-30 18:17:20 +01:00
Makefile.am Add support for building with meson/ninja 2018-08-30 11:10:45 -03:00
memslot.c memslot: Remove error parameter from memslot_get_virt 2018-07-03 12:23:54 +01:00
memslot.h memslot: Remove error parameter from memslot_get_virt 2018-07-03 12:23:54 +01:00
meson.build Add support for building with meson/ninja 2018-08-30 11:10:45 -03:00
migration-protocol.h Unify header guards 2017-03-30 18:17:20 +01:00
mjpeg-encoder.c mjpeg-encoder: Fix some typos 2017-11-29 11:17:21 +00:00
net-utils.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
net-utils.h reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
pixmap-cache.c pixmap-cache: Use GLib memory functions 2017-10-11 12:52:17 +01:00
pixmap-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-capabilities.c Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
red-channel-capabilities.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-client.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
red-channel-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-channel.c channel: Remove unused 3rd red_channel_register_client_cbs() arg 2018-06-21 17:54:27 +01:00
red-channel.h qxl: Remove red_channel_printerr() 2018-06-28 13:21:50 +01:00
red-client.c Remove unneeded spice_printerr() calls 2018-06-28 13:21:22 +01:00
red-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-common.h build: Remove unneeded spice_common.h includes 2018-07-06 07:06:34 +01:00
red-parse-qxl.c red-parse-qxl: Avoid invalid flag usage 2018-07-03 14:44:33 +01:00
red-parse-qxl.h cursor: Delay release of QXL guest cursor resources 2018-04-16 11:46:01 +02:00
red-pipe-item.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
red-pipe-item.h red-pipe-item: Move typedef at the top to avoid a "struct RedPipeItem" 2017-12-19 16:28:17 +00:00
red-qxl.c qxl: Remove red_channel_printerr() 2018-06-28 13:21:50 +01:00
red-qxl.h gl: fix client mouse mode 2017-10-04 10:57:39 +01:00
red-record-qxl.c memslot: Remove error parameter from memslot_get_virt 2018-07-03 12:23:54 +01:00
red-record-qxl.h red-record-qxl: Change license header to LGPLv2+ 2018-07-05 10:15:17 +02:00
red-replay-qxl.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
red-stream-device.c Log the invalid message from the stream device 2018-08-08 18:41:15 +02:00
red-stream-device.h Rename stream-device.[ch] to red-stream-device.[ch] 2018-03-13 10:53:05 +00:00
red-stream.c red-stream: Implements flush using TCP_CORK 2018-04-17 15:45:35 +01:00
red-stream.h red-stream: Define interface for manual flush 2018-04-17 15:45:28 +01:00
red-worker.c worker: Fix 'seemless' typo in comment 2018-07-20 09:15:33 +01:00
red-worker.h Reduce dependencies from red-qxl.h 2017-12-01 22:19:31 +00:00
reds-private.h stream-device: Create channels before first non-main channel connection 2018-03-08 11:14:34 +00:00
reds.c reds: Free device chain in spice_server_destroy to avoid leaks 2018-07-12 15:15:10 +01:00
reds.h reds: Fix typo in declaration 2017-12-12 07:03:02 +00:00
smartcard-channel-client.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
smartcard-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
smartcard.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
smartcard.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
sound.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
sound.h Change playback_compression to bool type 2017-04-07 15:08:43 -05:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Attempt to create bitmap debug directory 2017-04-07 16:45:54 +01:00
spice-bitmap-utils.h Use verify instead of G_STATIC_ASSERT 2017-12-01 22:49:46 +00:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-experimental.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h Remove unused structs QXLDrawArea and QXLDevInfo 2018-08-09 18:02:40 +01:00
spice-replay.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-server-enums.c.tmpl build: Rename spice-server-enums.tmpl.[ch] to spice-server-enums.[ch].tmpl 2018-03-07 10:04:04 -03:00
spice-server-enums.h.tmpl build: Rename spice-server-enums.tmpl.[ch] to spice-server-enums.[ch].tmpl 2018-03-07 10:04:04 -03:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c Replace spice_printerr() use with red_channel_{debug, warning} 2018-06-28 13:21:46 +01:00
stat-file.c stat-file: Exit earlier to reduce indentation 2018-06-25 13:12:04 +01:00
stat-file.h Unify header guards 2017-03-30 18:17:20 +01:00
stat.h Unify header guards 2017-03-30 18:17:20 +01:00
stream-channel.c Support h265 in stream-channel 2018-08-22 16:58:14 +02:00
stream-channel.h Make stream-channel.h self-contained 2017-10-30 12:01:24 +01:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c tree: Use GLib memory functions 2017-10-11 12:52:17 +01:00
tree.h Unify header guards 2017-03-30 18:17:20 +01:00
utils.c utils: Avoid possible unaligned access 2018-01-31 14:17:39 +00:00
utils.h utils: Use const for rgb32_data_has_alpha data argument 2018-01-29 21:11:38 +00:00
video-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
video-stream.c Use "base" as pipe item base field name 2018-06-18 13:40:51 +01:00
video-stream.h Use "base" as pipe item base field name 2018-06-18 13:40:51 +01:00
zlib-encoder.c Replace remaining spice_printerr() with g_warning() 2018-06-28 13:21:48 +01:00
zlib-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00