To compile Minecart, use one of the following dependending on your build target...
You may need to install some packages on your system to build Minecart. Currently I show how to build on Debian-based, RedHat-based, and MSYS2 (Windows) systems.
The following instructions apply to:
- Ubuntu 20.04, 18.04, 16.04
- Debian 10, 9
(Note: these instructions may be outdated)
sudo apt-get install -y \
build-essential \
cmake \
xorg-dev \
libgl1-mesa-dev \
libfreetype6-dev
The following instructions apply to:
- Fedora 22 and higher
(Note: these instructions may be outdated)
sudo dnf install -y \
gcc gcc-c++ make \
cmake \
mesa-libGL-devel \
libXrandr-devel \
libXinerama-devel \
libXcursor-devel \
libXi-devel \
freetype-devel
- x86_64 based systems
pacman -S base-devel mingw-w64-x86_64-{cmake,gcc,freeglut,glew,libpng,mesa,egl-headers}
- other systems
Replace mingw-w64-x86_64
with the architecture for your system (e.g. mingw-w64-clang-i686
)
Use the following to build for desktop:
cmake -B build
cmake --build build
Compiling for the web requires the Emscripten SDK:
mkdir build
cd build
emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" -DCMAKE_EXECUTABLE_SUFFIX=".html"
emmake make