AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   A CMake template for SourceMod projects (https://forums.alliedmods.net/showthread.php?t=345409)

bezdmn 01-11-2024 04:19

A CMake template for SourceMod projects
 
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


All times are GMT -4. The time now is 13:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.