Skip to content

LizardByte/build-deps

Repository files navigation

build-deps

GitHub Workflow Status

This is a common set of pre-compiled dependencies for LizardByte/Sunshine.

Usage

  1. Add this repository as a submodule to your project.

    git submodule add https://github.com/LizardByte/build-deps.git third-party/build-deps
    cd third-party/build-deps
    git submodule update --init --recursive
    checkout dist

Plans

  • Add more dependencies
    • boost
    • cuda (developer toolkit)
  • build linux dependencies in Docker (to more closely align with target environments)

License

This repo is licensed under the MIT License, but this does not cover submodules or patches. Please see the individual projects for their respective licenses.

Build

Checkout

git clone --recurse-submodules https://github.com/LizardByte/build-deps.git

ℹ️ If you have already clones the repository without submodules, you can initialize them with the following command:

cd build-deps
git submodule update --init --recursive

Line Endings

ℹ️ On Windows, you must copy the .gitattributes file to .git/modules/third-party/FFmpeg/x264/info/attributes, see https://stackoverflow.com/a/23671157/11214013 for more info.

Then run the following commands:

cd third-party/FFmpeg/x264
git checkout HEAD -- .

Dependencies

Linux

sudo apt install -y \
autoconf \
    automake \
    build-essential \
    cmake \
    git-core \
    libass-dev \
    libfreetype6-dev \
    libgnutls28-dev \
    libmp3lame-dev \
    libnuma-dev \
    libopus-dev \
    libsdl2-dev \
    libtool \
    libvorbis-dev \
    libxcb1-dev \
    libxcb-shm0-dev \
    libxcb-xfixes0-dev \
    make \
    meson \
    nasm \
    ninja-build \
    pkg-config \
    texinfo \
    wget \
    zlib1g-dev

macOS

brew install \
    automake \
    fdk-aac \
    git \
    lame \
    libass \
    libtool \
    libvorbis \
    libvpx \
    nasm \
    ninja \
    opus \
    pkg-config \
    sdl \
    shtool \
    texi2html \
    theora \
    wget \
    xvid

Windows

First, install MSYS2, then open the UCRT64 shell and run the following commands:

pacman -Syu
pacman -S \
    diffutils \
    git \
    make \
    pkg-config \
    mingw-w64-ucrt-x86_64-binutils \
    mingw-w64-ucrt-x86_64-cmake \
    mingw-w64-ucrt-x86_64-gcc \
    mingw-w64-ucrt-x86_64-make \
    mingw-w64-ucrt-x86_64-nasm \
    mingw-w64-ucrt-x86_64-ninja \
    mingw-w64-ucrt-x86_64-onevpl

Configure

Use the Unix Makefiles generator for Linux and macOS, and the MSYS Makefiles generator for Windows.

Standard

mkdir -p ./build/dist
cmake \
    -B ./build \
    -S . \
    -G "<generator>" \
    -DCMAKE_INSTALL_PREFIX=./build/dist

Cross Compile

mkdir -p ./build/dist
cmake \
    -B ./build \
    -S . \
    -G "<generator>" \
    -DCMAKE_INSTALL_PREFIX=./build/dist \
    -DCMAKE_TOOLCHAIN_FILE=./cmake/toolchains/<target>.cmake

Windows

ℹ️ On Windows, the environment is sometimes not properly passed to the make subprocesses. To account for this, there are three options. If the default does not work, you can try passing in the following flags:

-DMSYS2_OPTION=3

Valid options are, 1, 2, and 3. The default is 1.

Build

make -C build

Install

⚠️ It is critical that the -DCMAKE_INSTALL_PREFIX is set to the path where you want to install the dependencies.

make -C build install

About

Prebuilt dependencies for LizardByte projects.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages