A simple guide on building Element with CMake. Pease see cmake.org for how to install CMake on your platform.
This project uses git submodules. To get them, run:
git submodule update --init --recursive
Dependencies
The following packages are needed...
sudo apt-get install git build-essential pkg-config libboost-dev \
libfreetype-dev libx11-dev libxext-dev libxrandr-dev libxcomposite-dev \
libxinerama-dev libxrender-dev libxcursor-dev libxrender-dev libasound2-dev \
ladspa-sdk libcurl4-openssl-dev fonts-roboto clang clang++Compiling
cmake -B build -G Ninja
cmake --build build
Installing
sudo cmake --install build
sudo ldconfig
Install these packages, then run the cmake commands described above.
sudo pacman -S git base-devel cmake ninja pkgconf boost \
freetype2 fontconfig libx11 libxext libxrandr libxcomposite \
libxinerama libxrender libxcursor alsa-lib jack2 \
ladspa curl ttf-roboto clangYou can also build in a Docker container without installing packages on your system:
# Build the Arch Linux environment image
docker build -f Dockerfile.archlinux -t element:archlinux .
# Build the project with your source mounted as a volume
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/workspace element:archlinux bash -c "
git config --global --add safe.directory /workspace && \
git submodule update --init --recursive && \
cmake -B build-arch -G Ninja -DCMAKE_BUILD_TYPE=Release -DELEMENT_BUILD_PLUGINS=ON && \
cmake --build build-arch && \
ctest --test-dir build-arch --output-on-failure
"Or run interactively:
docker run --rm -it --user $(id -u):$(id -g) -v $(pwd):/workspace element:archlinux
# Then run cmake commands manually inside the containerDependencies
brew install boost
Build
cmake -B build
cmake --build build
This will make an app bundle somwhere in the build dir. Run it...
open $(find build -name "Element.app")
cmake -B build
cmake --build build
After this, you should have an Element.exe inside the build directory.