Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Oct 14, 2023
1 parent 6488a65 commit 1d41762
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,20 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)

if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO}")
endif()

include(GNUInstallDirs)

message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
message("CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}")
message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc
Expand Down
7 changes: 3 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"name": "base",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$env{COMMONLIBSF_COMPILER} $env{COMMONLIBSF_PLATFORM} $env{COMMONLIBSF_TEXT} $penv{CXXFLAGS}",
"CMAKE_SHARED_LINKER_FLAGS": "$env{COMMONLIBSF_LINKER}",
"CMAKE_CXX_FLAGS": "$env{COMMONLIBSF_COMPILER} $env{COMMONLIBSF_PLATFORM} $penv{CXXFLAGS}",
"CMAKE_SHARED_LINKER_FLAGS": "$env{COMMONLIBSF_LINKER} $penv{SHARED_LINKER_FLAGS}",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
}
},
Expand Down Expand Up @@ -56,8 +56,7 @@
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"intelliSenseMode": "windows-msvc-x64",
"enableMicrosoftCodeAnalysis": true,
"enableClangTidyCodeAnalysis": true
"enableMicrosoftCodeAnalysis": true
}
}
},
Expand Down
8 changes: 1 addition & 7 deletions include/PCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,10 @@

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

// clang-format off
#include <RE/Starfield.h>
#include <REL/Relocation.h>
#include <REL/REL.h>
#include <SFSE/SFSE.h>

#include <ShlObj_core.h>
#include <Psapi.h>
#include <Windows.h>
// clang-format on

#include "Plugin.h"

using namespace std::literals;
Expand Down
2 changes: 1 addition & 1 deletion src/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Hooks
{
void Install() noexcept
{
REL::Relocation target{ REL::ID(151616), 0x22F };
REL::Relocation target{ REL::ID(151616), 0x22f };
stl::write_thunk_call<GetFactionFightReaction>(target.address());
}
} // namespace Hooks
2 changes: 1 addition & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SFSEPluginLoad(const SFSE::LoadInterface* sfse)
{
Init(sfse);

logger::info("{} {} is loading...", Plugin::Name, Plugin::Version.string("."sv));
logger::info("{} {} is loading...", Plugin::Name, Plugin::Version.string());

if (const auto messaging{ SFSE::GetMessagingInterface() }; !messaging->RegisterListener(Listener))
return false;
Expand Down
4 changes: 2 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "b40de44891dc1cab11d4722094ae44807a837b98"
"baseline": "486a4640db740f5994e492eb60748111dfc48de7"
},
"registries": [
{
"kind": "git",
"repository": "https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg",
"baseline": "f90c5a628164c55cb83ad82c4e4293e7015924e7",
"baseline": "55d62818c3b1fe6a06e6059aef1fe2a7006cefc0",
"packages": ["commonlibsf"]
}
]
Expand Down

0 comments on commit 1d41762

Please sign in to comment.