This template consumes CommonLibSF either as a vcpkg port or as a git submodule. When you run the project setup script, you will be prompted to choose between the two (the default is via vcpkg).
A python script, project_setup.py
, is provided which automates several housekeeping steps required to get the template development-ready (requires Python). To run the script:
- Run
cd .\CLibSFPluginTemplate\
- Run
py .\project_setup.py
- Choose how to consume CommonLibSF
- Press
Enter
to use the default of consuming CommonLibSF via vcpkg - Enter
y
to consume CommonLibSF as a git submodule instead
- Press
- Enter your project name (in CamelCase)
- Visual Studio should prompt you to generate a CMake cache. Click on
Generate
and wait - One the CMake cache is generated, build your project
- The
.dll
and.pdb
files will be placed incontrib\PluginRelease
orcontrib\PluginDebug
depending on your build configuration
- Two build configs are provided:
Release
: Optimized release build, produces small and fast DLLs with associated PDBsDebug
: Debug build, produces DLLs and PDBs with full debug info, allowing the use of an interactive debugger
Many CommonLib plugins expose settings through configuration files so that the user can control plugin behavior. This template includes simpleini which allows you to read settings from the ini file in contrib\config
(see Settings.cpp
).
- CMake v3.27+
- vcpkg v2023.08.09+
- Create a new Windows environment variable called
VCPKG_ROOT
which points to your vcpkg install directory
- Create a new Windows environment variable called
- Visual Studio 2022 with C++ workload
- Python
- LLVM v17.0.0+ (not really a dependency but nice to have)