Building - AtesComp/miraclecast GitHub Wiki

Building MiracleCast

Build Systems

You have options to build MiracleCast. Each is feature complete, so use your preferred builder:

Autotools:

$ mkdir build
$ cd build
$ ../autogen.sh g --prefix=/usr
$ make
$ make install

The g option is for debug compilation. Use c for optimized compilation.

CMake:

$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make
$ make install

Meson:

$ meson build --prefix=/usr --sysconfdir=/etc
$ cd build
$ ninja
$ ninja test
$ ninja install

Tips:

  • In autotools, autogen.sh accepts arguments to have specific configuration:

    • c: compilation
    • g: debugging
    • a: pure/const warning
    • l: clang build
    • s: scan-build reporting
  • For CMake build, remember to remove CMakeCache.txt or 'cmake .' will not regenerate Makefiles

  • For Meson build, use 'mesontest --wrap ' to run test with specific executable. Use that to pass the test with valgrind

  • Usually, you need to install as a privileged user. There's many ways to do that...normally sudo will work.

    $ sudo make install
    $ sudo ninja install
    
  • By default, MiracleCast will be installed in /usr/local. If you want to install in the standard /usr path:

    • For Autotools and Meson, add '--prefix=/usr'
    • For CMake, add '-DCMAKE_INSTALL_PREFIX=/usr'
  • A dbus policy is needed to expose dbus interfaces. This is created in '/etc' normally. You can modify it:

    • For Autotools and Meson, add '--syconfdir='
    • For CMake, add '-DSYSCONFDIR='
⚠️ **GitHub.com Fallback** ⚠️