(This is a fork of SFML by Vittorio Romeo.)
-
Get and install MSYS2
-
Open a MSYS shell (see MSYS2 Environments) and run the following command:
pacman -S mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-clang-tools-extra mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake git mingw-w64-ucrt-x86_64-lld mingw-w64-ucrt-x86_64-ccache mingw-w64-clang-x86_64-ccache
-
Open a UCRT64 shell (see MSYS2 Environments)
-
Clone this repository:
git clone https://github.com/vittorioromeo/VRSFML
-
Enter the directory and run CMake with one of the presets:
cd VRSFML cmake --preset vrdev_clang
-
Enter the preset build directory and run
ninja
:cd build_vrdev_clang ninja
-
If the build succeeded, you should now be able to run examples directly from the build directory using the
run_example.sh
script:../run_example.sh island
-
For Emscripten support, run the following command:
pacman -S mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-clang-tools-extra mingw-w64-clang-x86_64-gcc mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-emscripten
-
Open a CLANG64 shell (UCRT64 is bugged with Emscripten at the moment) (see MSYS2 Environments)
-
In the main repository directory, run:
cmake --preset vrdev_emcc cd build_vrdev_emcc ninja
-
If the build succeeded, you should now be able to run examples directly from the build directory using the
run_emscripten_example.sh
script:../run_emscripten_example.sh island
Contributed by @menuet.
COMPILER=gcc-14
PRESET=vrdev_gcc
# Install necessary tools and dependencies
sudo apt-get update
sudo apt-get install -y --no-install-recommends nodejs npm git mesa-utils lld
sudo apt-get install -y --no-install-recommends libxrandr-dev libxi-dev libxcursor-dev libglfw3-dev libudev-dev libfreetype-dev libogg-dev libvorbis-dev libflac-dev
sudo npm install -g [email protected]
sudo setup-cpp --compiler ${COMPILER} --cmake true --ninja true --ccache true --make true
# Export env vars for using tools
sudo -s
source .cpprc
exit
source .cpprc
# Verify tools availability
glxinfo | head -n10
git --version
g++ --version
cmake --version
ninja --version
ccache --version
# Create a working directory
mkdir -p work
cd work
# Clone the repo
git clone https://github.com/vittorioromeo/VRSFML.git
# Cmake Configure and Build
cd VRSFML
git checkout try-fix-build
cmake --preset ${PRESET}
cmake --build build_${PRESET}