Switched CommonlibSSE-NG to alandtse's fork

This commit is contained in:
Eddoursul 2024-07-27 16:30:58 +02:00
parent 7675374689
commit 747140eabc
4 changed files with 53 additions and 32 deletions

View File

@ -6,30 +6,27 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
######################################################################################################################## ########################################################################################################################
project( project(
EnderalSE EnderalSE
VERSION 2.1.0 VERSION 2.1.2
DESCRIPTION "Enderal SE DLL" DESCRIPTION "Enderal SE DLL"
LANGUAGES CXX) LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
include(GNUInstallDirs)
find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c")
configure_file( configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
@ONLY) @ONLY)
#include(GNUInstallDirs)
find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c")
set(sources file(
src/Main.cpp GLOB_RECURSE
src/EventListener.cpp sources
src/Papyrus.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
src/Patches/TweenMenuPatch.cpp ${CMAKE_CURRENT_BINARY_DIR}/version.rc
src/Patches/HeroMenuPatch.cpp )
${CMAKE_CURRENT_BINARY_DIR}/version.rc)
source_group( source_group(
TREE ${CMAKE_CURRENT_SOURCE_DIR} TREE ${CMAKE_CURRENT_SOURCE_DIR}
@ -40,10 +37,35 @@ source_group(
######################################################################################################################## ########################################################################################################################
## Configure target DLL ## Configure target DLL
######################################################################################################################## ########################################################################################################################
find_package(CommonLibSSE CONFIG REQUIRED)
include(FetchContent)
FetchContent_Declare(
CommonLibNG
GIT_REPOSITORY https://github.com/alandtse/CommonLibVR.git
GIT_TAG 735fa6dae8ec72966ee02673dd689c6516d49f71
)
set(ENABLE_SKYRIM_SE ON CACHE BOOL " " FORCE)
set(ENABLE_SKYRIM_AE ON CACHE BOOL " " FORCE)
set(ENABLE_SKYRIM_VR ON CACHE BOOL " " FORCE)
set(BUILD_TESTS OFF CACHE BOOL " " FORCE)
#FetchContent_MakeAvailable(CommonLibNG)
# Use a local copy instead
add_subdirectory("d:/Git/CommonLibVR/" ${CMAKE_BINARY_DIR}/_deps/clib-build)
#find_package(CommonLibSSE CONFIG REQUIRED)
get_target_property(COMMONLIB_SRC_DIR CommonLibSSE SOURCE_DIR)
include(${COMMONLIB_SRC_DIR}/cmake/CommonLibSSE.cmake)
add_commonlibsse_plugin(${PROJECT_NAME} SOURCES ${headers} ${sources}) add_commonlibsse_plugin(${PROJECT_NAME} SOURCES ${headers} ${sources})
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}") add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")
target_link_libraries(${PROJECT_NAME} PUBLIC CommonLibSSE::CommonLibSSE)
target_include_directories(${PROJECT_NAME} target_include_directories(${PROJECT_NAME}
PRIVATE PRIVATE
@ -57,6 +79,15 @@ target_include_directories(${PROJECT_NAME}
PUBLIC PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
find_package(spdlog CONFIG REQUIRED)
target_link_libraries(
"${PROJECT_NAME}"
PUBLIC
spdlog::spdlog
Version.lib
)
target_precompile_headers(${PROJECT_NAME} target_precompile_headers(${PROJECT_NAME}
PRIVATE PRIVATE
src/PCH.h) src/PCH.h)
@ -74,3 +105,4 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/") COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/") COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/")

View File

@ -13,7 +13,7 @@ namespace BinkInterruptPatch
return true; return true;
} }
if (SKSE::WinAPI::GetKeyState(VK_SPACE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_ESCAPE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_RBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LMENU) & 0x8000) { if (REX::W32::GetKeyState(VK_SPACE) & 0x8000 || REX::W32::GetKeyState(VK_ESCAPE) & 0x8000 || REX::W32::GetKeyState(VK_LBUTTON) & 0x8000 || REX::W32::GetKeyState(VK_RBUTTON) & 0x8000 || REX::W32::GetKeyState(VK_LMENU) & 0x8000) {
return false; return false;
} }

View File

@ -2,19 +2,6 @@
"default-registry": { "default-registry": {
"kind": "git", "kind": "git",
"repository": "https://github.com/microsoft/vcpkg.git", "repository": "https://github.com/microsoft/vcpkg.git",
"baseline": "08c4e71048eb54733d9b180a28b9b1d7ce637454" "baseline": "cacf5994341f27e9a14a7b8724b0634b138ecb30"
}, }
"registries": [
{
"kind": "git",
"repository": "https://gitlab.com/colorglass/vcpkg-colorglass",
"baseline": "6309841a1ce770409708a67a9ba5c26c537d2937",
"packages": [
"commonlibsse-ng",
"gluino",
"script-extender-common",
"skse"
]
}
]
} }

View File

@ -10,8 +10,10 @@
"plugin": { "plugin": {
"description": "Enderal SE functions and potion replacer.", "description": "Enderal SE functions and potion replacer.",
"dependencies": [ "dependencies": [
"commonlibsse-ng", "simpleini",
"simpleini" "spdlog",
"directxtk",
"rapidcsv"
] ]
} }
}, },