- CMake v3.26+ or XMake v2.8.2+
- Add this to your PATH
- vcpkg
- Add the environment variable
VCPKG_ROOT
with the value as the path to the folder containing vcpkg
- Add the environment variable
- Visual Studio 2022 with "Desktop development with C++"
- clang-cl toolset and build support if using
clang-cl
configuration
- clang-cl toolset and build support if using
- PowerShell
You can choose from the following community plugin templates to speed up the setup process:
- CLibSFPluginTemplate
- Uses CMake. Consumes CommonLibSF as a vcpkg port package or git submodule.
- SF_PluginTemplate
- Uses CMake. Consumes CommonLibSF as a git submodule or local fork.
- commonlibsf-template-xmake
- Uses XMake. Consumes CommonLibSF as an xrepo package.
Instructions for consuming CommonLibSF using vcpkg are provided at our vcpkg registry repo.
Thanks to Qudix for maintaining the custom xmake repo!
Add the following to your xmake.lua
:
-- add commonlibsf-xrepo repository
add_repositories("re https://github.com/Starfield-Reverse-Engineering/commonlibsf-xrepo")
-- require package dependencies
add_requires("commonlibsf")
target("name")
...
-- bind packages to the target
add_packages("commonlibsf")
To consume CommonLibSF as a submodule, cd
into your project directory and run:
git submodule add https://github.com/Starfield-Reverse-Engineering/CommonLibSF extern/CommonLibSF
git submodule update -f --init
Then add the following to your CMakeLists.txt
:
add_subdirectory(extern/CommonLibSF)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
CommonLibSF::CommonLibSF
)
NOTE: You may also use the custom add_commonlibsf_plugin
command instead of target_link_libraries
.
CommonLibSF is incompatible with SFSE and is intended to replace it as a static dependency—the runtime component is still required.
GPL-3.0-or-later WITH Modding Exception AND GPL-3.0 Linking Exception (with Corresponding Source).
Specifically, the Modded Code is Starfield (and its variants) and Modding Libraries include SFSE (GitHub link).
It is recommended to read the FSF FAQ for a full explanation on what this license requires.
The main requirement of this license is: if you link your mod against CommonLibSF, and you distribute the binaries for that mod, you must also distribute the source code under the same license as CommonLibSF along with the source code for any other libraries you link against, with the exception of the Modded Code and Modding Libraries defined above.
This work is based on CommonLibSSE created by Ryan-rsm-McKenzie under an MIT License. Without him putting that together, much of the joint Bethesda RE scene would be drastically different. The MIT License is kept for historical purposes only and the GPL governs this work. To the extent that you want the MIT licensed code, please reference CommonLibSSE and its forks.