View Single Post
Author Message
bezdmn
New Member
Join Date: Dec 2023
Old 01-11-2024 , 04:19   A CMake template for SourceMod projects
Reply With Quote #1

Write your new plugin or extension in VS2022, then compile it using CMake inside a WSL2 environment and run it on your srcds test/prototyping server automatically.

Prerequisites: A working WSL version 2 with a full development environment and a SRCDS setup

1. Install Windows Subsystem for Linux. Check that the installed WSL is version 2 using "wsl --list -v".

2. In the (Debian based) Linux, install CMake and the development environment including multiarch support with "sudo dpkg --add-architecture i386; sudo apt-get update && sudo apt-get upgrade" and "sudo apt-get install build-essential cmake ninja-build rsync zip gcc-multilib g++-multilib"

In Visual Studio 2022:

3. Under Tools > CMake > General, select "Always use CMake presets", close the current folder and reopen it again. This should make the connections and configuration managers appear in the top bar.

4. Initialize your project by cloning this repository: either by using PowerShell or through Visual Studio's "File -> Clone Repository"

Check the README for more instructions and some references


GitHub source

Last edited by bezdmn; 01-11-2024 at 04:29.
bezdmn is offline