- clang & llvm (make sure you have clang-cl)
- cmake (duh)
- git
Install xwin, you can also just use one of the unknown-linux
tarballs from the releases
Now decide where you want your splat folder to be (this is the folder with the windows sdk and msvc headers/libs).
For this guide i'll be using ~/splat
to refer to this directory
Now run this command to download and extract all the headers:
xwin --arch x86_64 --accept-license splat --include-debug-libs --output splat
Clone the clang-msvc-sdk repo, which contains the cmake toolchain file.
For this guide i'll be using ~/toolchain
to refer to the directory of the repo
git clone https://github.com/matcool/clang-msvc-sdk.git toolchain
Since configuring the toolchain requires a lot of enviroment vars, i'll be creating a bash script with them.
Run this in the directory of your own CMake project of course..
build.sh
# remember to actually set these..
export SPLAT_DIR=/home/mat/splat
export TOOLCHAIN=/home/mat/toolchain/clang-cl-msvc.cmake
export HOST_ARCH=x86_64
# you can also use `-G Ninja` here
cmake \
-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build --config Release
Apparently the newer msvc stls require clang 16+, at least i got an error with clang 15 :(
These were all the packages i had to install on ubuntu to get this to work
sudo apt install git cmake clang-17 clang-tools-17 lld-17
i don't think it's that old, i run openssl version and it returns 3.1.1