Note: I plan to add vcpkg support in the future, but for now, only xmake is supported for most packages.
To use these xmake packages, add the following to your xmake.lua file:
add_repositories("SkyrimScripting https://github.com/SkyrimScripting/Packages.git")skyrim-commonlib-aeskyrim-commonlib-seskyrim-commonlib-vrskyrim-commonlib-ng
xmake packages available:
skyrim-commonlib-ae( Adds dependency on @powerof3's CommonLibSSE configured for Skyrim 1.6+ compatibility )skyrim-commonlib-se( Adds dependency on @powerof3's CommonLibSSE configured for Skyrim 1.5.97 compatibility )skyrim-commonlib-vr( Adds dependency on @alandtse's CommonLibVR )skyrim-commonlib-ng( Adds dependency on @CharmedBaryon's CommonLibSSE-NG )
Or any of the other packages listed above:
-- For example, to use the VR version of CommonLib:
add_requires("skyrim-commonlib-ae")
target("My-SKSE-Plugin")
add_files("plugin.cpp")
-- This will add the CommonLibSSE dependency
add_packages("skyrim-commonlib-ae")
-- And don't forget to add the rules for the plugin
add_rules("@skyrim-commonlib-ae/plugin")target("My-SKSE-Plugin")
add_files("plugin.cpp")
add_packages("skyrim-commonlib-ae")
add_rules("@skyrim-commonlib-ae/plugin", {
name = "My-SKSE-Plugin", -- This defaults to the target name
version = "420.1.69", -- This defaults to the target version or "0.0.0"
author = "Mrowr Purr",
email = "[email protected]",
mods_folder = os.getenv("MO2_or_VORTEX_mods_folder_path"),
mod_files = {"Scripts", "", "AnythingToDeployToTheModFolder"}
})To enable xbyak support, enable the xybak option (available for any version):
add_requires("skyrim-commonlib-ae", { configs = { xbyak = true } })This will provide the following function (which is otherwise unavailable):
SKSE::Trampoline::allocate(Xbyak::CodeGenerator& codeGenerator)Optionally, you can define one or more "mods" folders to deploy the plugin dll/pdb to:
add_requires("skyrim-commonlib-ae")
target("My-SKSE-Plugin")
add_files("plugin.cpp")
add_packages("skyrim-commonlib-ae")
add_rules("@skyrim-commonlib-ae/plugin", {
-- This will output to the following generated folder location:
-- C:/Path/to/my/mods/My-SKSE-Plugin/SKSE/Plugins/My-SKSE-Plugin.dll
mods_folder = "C:/Path/to/my/mods"
})
-- Note: use the rule with a name matching the package that you are using:
-- add_rules("@skyrim-commonlib-vr/plugin", {...
-- add_rules("@skyrim-commonlib-ae/plugin", {...
-- add_rules("@skyrim-commonlib-se/plugin", {...
-- add_rules("@skyrim-commonlib-vr/plugin", {...If you have multiple mods folders, you can specify them as a list:
add_requires("skyrim-commonlib-ae")
target("My-SKSE-Plugin")
add_files("plugin.cpp")
add_packages("skyrim-commonlib-ae")
add_rules("@skyrim-commonlib-ae/plugin", {
mod_folders = { "C:/...", "C:/..." }
})Paths containing a ; are split, allowing for use of an environment varialbe to specify multiple output paths:
add_requires("skyrim-commonlib-ae")
target("My-SKSE-Plugin")
add_files("plugin.cpp")
add_packages("skyrim-commonlib-ae")
add_rules("@skyrim-commonlib-ae/plugin", {
mod_folders = os.getenv("SKYRIM_MOD_FOLDERS")
})You can also specify additional files to deploy to the mod folder:
add_requires("skyrim-commonlib-ae")
target("My-SKSE-Plugin")
add_files("plugin.cpp")
add_packages("skyrim-commonlib-ae")
add_rules("@skyrim-commonlib-ae/plugin", {
mod_files = { "Scripts", "", "AnythingToDeployToTheModFolder" }
})These xmake configurations were originally based on these CommonLibSSE-NG xmake package configuration: https://github.com/xmake-io/xmake-repo License: Apache 2.0
That xmake configuration was authored by by Qudix (https://github.com/Qudix)
Modifications were made to the original code