Skip to content

Windows macOS Linux

xfangfang edited this page Feb 19, 2025 · 1 revision

Building the demo for PC

To build for PC, the following components are required:

  • cmake/make build system
  • A C++ compiler supporting the C++17 standard

Please refer to the usual sources of information for your particular operating system. Usually the commands needed to build this project will look like this:

cmake -B build_pc -DPLATFORM_DESKTOP=ON -DCMAKE_BUILD_TYPE=Release
make -C build_pc -j$(nproc)
  • crosscompile using mingw64 under ubuntu/debian
sudo apt-get install g++-mingw-w64-x86-64-posix
cmake -B build_mingw -DPLATFORM_DESKTOP=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="library/cmake/MinGWCross.cmake"
make -C build_mingw -j$(nproc)

Also, please note that the resources folder must be available in the working directory, otherwise the program will fail to find the shaders.

Building the demo for WinRT

# generate key for codesigning (optional)
openssl req -nodes -newkey rsa:2048 -keyout cert.key -out cert.crt -x509 -days 365 -subj '//CN=borealis' \
  -extensions 'v3_req' -addext 'extendedKeyUsage=codeSigning'
openssl pkcs12 -export -nodes -out winrt/key.pfx -inkey cert.key -in cert.crt -passout pass:

# add xmake repo
xmake repo -a local https://github.com/zeromake/xrepo.git

xmake f -c -y --winrt=y --window=sdl --driver=d3d11
xmake b -y demo
Clone this wiki locally