Introduction (中文)
Test is built using xmake, for a related xmake tutorial check out xmake-io.
Some of the dependencies of this project are system libraries (e.g. libx11-dev) or third-party libraries that you need to install by yourself (e.g. vulkansdk, pkg-config). You need to install them before configuring with xmake.
Of course, if some of the 3rd-party libraries that can be installed from xmake witch you also want to use the ones from system, you can also use the xmake configuration after installing them.
But the following must be installed by yourself, here is an example for ubuntu 24.04:
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.296-noble.list https://packages.lunarg.com/vulkan/1.3.296/lunarg-vulkan-1.3.296-noble.list
sudo apt update
sudo apt install libx11-dev libwayland-dev libxext-dev pkg-config vulkan-sdk
For Windows it is much easier, just go to the following website, download and install vulkansdk:
https://vulkan.lunarg.com/sdk/home
Before building, you need to configure the project.
xmake f -p windows -a x64 -m releasedbg -k shared --runtimes=MD --3rd_kind=shared -cv
xmake f -p windows -a x64 -m releasedbg -k shared --runtimes=MD --3rd_kind=shared --toolchain=clang-cl -cv
xmake f -p mingw -a x86_64 -m releasedbg -k shared --runtimes=stdc++_shared --3rd_kind=shared --mingw=/path_of_mingw -cv
xmake f -p linux -a x86_64 -m releasedbg -k shared --runtimes=stdc++_shared --3rd_kind=shared -cv
xmake f -p linux -a x86_64 -m releasedbg -k shared --runtimes=stdc++_shared --3rd_kind=shared --toolchain=gcc-13 -cv
xmake f -p linux -a x86_64 -m releasedbg -k shared --runtimes=stdc++_shared --3rd_kind=shared --toolchain=llvm -cv
After configure, it's time to compile this project with this command:
xmake -a
Or you can use this command to recompile it all:
xmake -ar
Or you can use this command to display compilation details:
xmake -av
And their combinations:
xmake -arv
Get help please use:
xmake --help