Commit Graph

5 Commits (d706c5df3991a35b5f98058bfd2f640bcef05ea7)

Author SHA1 Message Date
Romain Vimont c4a1fc746b Explicitly use ISO C11
ISO C99 doesn't support unnamed structs/unions.
6 years ago
zack aac9d5057f Fix meson error: ‘for’ loop initial declarations are only allowed in C99 mode. 6 years ago
Romain Vimont 0efa9305eb Require Meson 0.37
Older versions of Meson are too limited, and it's simple to install a
newer version ("pip3 install meson").
6 years ago
Romain Vimont c2127d0819 Replace meson subprojects by subdir
Since Meson 0.44, subproject_dir may not be '.' anymore. This implies we
must move app/ and server/ to a subprojects/ directory, which requires
to also change some gradle files.

Instead, just use subdir(), with options to disable building of the app
or the server.
6 years ago
Romain Vimont ff94462d8a Refactor build system
The client was built with Meson, the server with Gradle, and were run by
a Makefile.

Add a Meson script for the server (which delegates to Gradle), and a
parent script to build and install both the client and the server to the
system, typically with:

    meson --buildtype release build
    cd build
    ninja
    sudo ninja install

In addition, use a separate Makefile to build a "portable" version of
the application (where the client expects the server to be in the
current directory). Typically:

    make release-portable
    cd dist/scrcpy
    ./scrcpy

This is especially useful for Windows builds, which are not "installed".
6 years ago