Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CppAPI/.buildenv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
30 changes: 30 additions & 0 deletions CppAPI/.buildenv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.21)

project(SkyrimNetPlugins VERSION 1.0.0 LANGUAGES CXX)

set(OUTPUT_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/../../")

find_package(CommonLibSSE CONFIG REQUIRED)

function(add_skse_plugin PLUGIN_NAME)
add_commonlibsse_plugin(${PLUGIN_NAME} VERSION 1.0.0 SOURCES ${ARGN})
target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_23)
target_include_directories(${PLUGIN_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_precompile_headers(${PLUGIN_NAME} PRIVATE ../PCH.h)

if(DEFINED OUTPUT_FOLDER)
set(DLL_FOLDER "${OUTPUT_FOLDER}/SKSE/Plugins")
message(STATUS "${PLUGIN_NAME} output: ${DLL_FOLDER}")
add_custom_command(
TARGET "${PLUGIN_NAME}"
POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E make_directory "${DLL_FOLDER}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${PLUGIN_NAME}>" "${DLL_FOLDER}/$<TARGET_FILE_NAME:${PLUGIN_NAME}>"
VERBATIM
)
endif()
endfunction()

add_skse_plugin("SkyrimNetMountDecorator" "../src/main.mount.cpp")
add_skse_plugin("SkyrimNetTemperDecorator" "../src/main.temper.cpp")
add_skse_plugin("SkyrimNetQuestJournalDecorator" "../src/main.quest_journal.cpp")
39 changes: 39 additions & 0 deletions CppAPI/.buildenv/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": 3,
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/install/${presetName}",
"architecture": { "value": "x64", "strategy": "external" },
"cacheVariables": {
"CMAKE_CXX_COMPILER": "cl.exe",
"CMAKE_CXX_FLAGS": "/permissive- /Zc:preprocessor /EHsc /MP /W4 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DUNICODE -D_UNICODE",
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static-md",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "debug",
"inherits": ["base"],
"displayName": "Debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "release",
"inherits": ["base"],
"displayName": "Release",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "releasewithdeb",
"inherits": ["base"],
"displayName": "Release With Debug Info",
"cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" }
}
]
}
18 changes: 18 additions & 0 deletions CppAPI/.buildenv/vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg.git",
"baseline": "c756f54b9c1431080a54084f24cbf464579f675f"
},
"registries": [
{
"kind": "git",
"repository": "https://gitlab.com/colorglass/vcpkg-colorglass",
"baseline": "6fb127f7d425ae3cf3fab0f79005d907c885c0d8",
"packages": [
"commonlibsse-ng"
]
}
],
"overlay-ports": ["./overlayports"]
}
7 changes: 7 additions & 0 deletions CppAPI/.buildenv/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"dependencies": [
"commonlibsse-ng",
"spdlog"
]
}
11 changes: 11 additions & 0 deletions CppAPI/PCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#undef ENABLE_SKYRIM_VR

#include "RE/Skyrim.h"
#include "SKSE/SKSE.h"

#include <string>

using namespace std::literals;
namespace logger = SKSE::log;
Loading
Loading