Generic instructions for building Friction on supported systems.
- pkg-config
- ninja
- python3
- cmake (3.12+)
- clang (7+)
- Qt (5.15.x)
- Gui
- Widgets
- OpenGL
- Multimedia
- Qml
- Xml
- qscintilla
- ffmpeg (4.2.x)
- libavformat
- libavcodec
- libavutil
- libswscale
- libswresample
- libunwind
- expat
- harfbuzz
- freetype
- fontconfig
- libjpeg-turbo
- libpng
- libwebp
- zlib
- icu
- Visual Studio 2017 Build Tools
git
must be available inPATH
cmake
must be available inPATH
python3
must be available inPATH
- LLVM installed to default location
- Qt 5.15 libraries and headers in
friction\sdk
- See configure_qt5.bat and build_qt5.bat
- QScintilla libraries and headers in
friction\sdk
- FFmpeg 4.2 libraries and headers in
friction\sdk
- See build_mxe_ffmpeg.sh and mxe
Binary SDK available here.
- macOS Monterey 12.7 x86-64
- Xcode 14.2 (Apple clang 14)
Install required packages from macports:
sudo port install qt5-qtbase qt5-qttools qt5-qtmultimedia qt5-qtdeclarative qscintilla-qt5 ffmpeg pkgconfig ninja
- FFmpeg in macports is not supported (render issues), a custom Portfile or build will be made available.
python
andpython3
must be available inPATH
and point to a Python 3 install.
git clone --recurse-submodules https://github.com/friction2d/friction
or
git clone --recurse-submodules https://codeberg.org/friction/friction
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
..
Note that on some configurations you may need to specify qscintilla
paths:
-DQSCINTILLA_INCLUDE_DIRS=<PATH_TO_QSCINTILLA_INCLUDE_DIR> \
-DQSCINTILLA_LIBRARIES_DIRS=<PATH_TO_LIBS> \
-DQSCINTILLA_LIBRARIES=<QSCINTILLA_LIBRARY_NAME> \
Now build:
cmake --build . --config Release
All requirements must be installed in the correct folders, this is an example and should be adjusted to fit your environment.
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat"
set SDK_DIR=%cd%\sdk
set PATH=C:\Python;%ProgramFiles%\CMake\bin;%ProgramFiles%\Git\bin;%SDK_DIR%\bin;%PATH%
mkdir build
cd build
cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%SDK_DIR% ..
cmake --build . --config Release