diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e1a605..e9fc486 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,16 +49,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ set(SKSE_SUPPORT_XBYAK 1) -message(STATUS "SKYRIM_VERSION is ${SKYRIM_VERSION}") -if("${SKYRIM_VERSION}" STREQUAL "AE1") - add_subdirectory(dependencies/CommonLibSSE_AE) -elseif("${SKYRIM_VERSION}" STREQUAL "AE2") - add_subdirectory(dependencies/CommonLibSSE_AE) -elseif("${SKYRIM_VERSION}" STREQUAL "PRE_AE") - add_subdirectory(dependencies/CommonLibSSE_PRE_AE) -else() - message(FATAL_ERROR "Must set SKYRIM_VERSION to one of: PRE_AE, AE1, AE2") -endif() +find_package(CommonLibSSE REQUIRED) ################################################################################ # Build Protocol Buffers @@ -82,7 +73,6 @@ string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" $<$:MultiThreaded>) # Also force it on CommonLibSSE and Protobuf -set_target_properties(CommonLibSSE PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) set_target_properties(ProtocolBuffers PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) ################################################################################ @@ -129,7 +119,6 @@ target_precompile_headers(SkyrimOutfitSystemSE PRIVATE target_compile_definitions(SkyrimOutfitSystemSE PRIVATE XBYAK_NO_OP_NAMES - "SKYRIM_VERSION_IS_${SKYRIM_VERSION}=1" ) target_compile_features(SkyrimOutfitSystemSE PRIVATE @@ -169,7 +158,7 @@ endif() # Install steps ################################################################################ add_custom_command(TARGET SkyrimOutfitSystemSE POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_CURRENT_SOURCE_DIR}/mod_files/PluginVersions/SkyrimOutfitSystemSE_${SKYRIM_VERSION}.dll" + COMMAND ${CMAKE_COMMAND} -E copy $ "${CMAKE_CURRENT_SOURCE_DIR}/mod_files/PluginVersions/SkyrimOutfitSystemSE_ALL.dll" ) ################################################################################ @@ -181,7 +170,7 @@ find_package(spdlog REQUIRED CONFIG) find_package(xbyak REQUIRED CONFIG) target_link_libraries(SkyrimOutfitSystemSE PUBLIC - CommonLibSSE + CommonLibSSE::CommonLibSSE nonstd::span-lite spdlog::spdlog ProtocolBuffers diff --git a/include/SOS_PCH.h b/include/SOS_PCH.h index 7f04420..314e9be 100644 --- a/include/SOS_PCH.h +++ b/include/SOS_PCH.h @@ -7,48 +7,11 @@ #include "version.h" -#if SKYRIM_VERSION_IS_AE1 || SKYRIM_VERSION_IS_AE2 -#define SKYRIM_VERSION_IS_SOME_AE 1 -#endif - #pragma warning(push) -#if SKYRIM_VERSION_IS_SOME_AE #include "SKSE/Impl/PCH.h" #include #include #include -#include -#include -#include "RE/T/TESObjectARMO.h" -#include "RE/P/PlayerCharacter.h" -#include "RE/A/ActorEquipManager.h" -#include "RE/I/InventoryChanges.h" -#include "RE/I/InventoryEntryData.h" -#include "RE/P/PlayerCharacter.h" -#include "RE/T/TESObjectARMO.h" -#include "RE/T/TESObjectREFR.h" -#include "RE/I/IVirtualMachine.h" -#include "RE/T/TESForm.h" -#include "RE/I/IVirtualMachine.h" -#elif SKYRIM_VERSION_IS_PRE_AE -#include "SKSE/Impl/PCH.h" -#include -#include -#include -#include -#include -#include "RE/T/TESObjectARMO.h" -#include "RE/P/PlayerCharacter.h" -#include "RE/A/ActorEquipManager.h" -#include "RE/I/InventoryChanges.h" -#include "RE/I/InventoryEntryData.h" -#include "RE/P/PlayerCharacter.h" -#include "RE/T/TESObjectARMO.h" -#include "RE/T/TESObjectREFR.h" -#include "RE/I/IVirtualMachine.h" -#include "RE/T/TESForm.h" -#include "RE/I/IVirtualMachine.h" -#endif #ifdef NDEBUG # include diff --git a/src/Utility.cpp b/src/Utility.cpp index 3a78734..9f26b80 100644 --- a/src/Utility.cpp +++ b/src/Utility.cpp @@ -6,6 +6,9 @@ #include "SKSE/SKSE.h" +#undef GetModuleFileName +#undef GetModuleHandle + std::string GetRuntimePath() { static char appPath[4096] = {0}; diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000..58dc7a5 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,16 @@ +{ + "registries": [ + { + "kind": "git", + "repository": "https://gitlab.com/colorglass/vcpkg-colorglass", + "baseline": "1b279b20c7e0db1c9d549ff3b64e024c01317b55", + "packages": [ + "commonlibsse-ng", + "commonlibsse-ng-ae", + "commonlibsse-ng-se", + "commonlibsse-ng-vr", + "commonlibsse-ng-flatrim" + ] + } + ] +} \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 3ed12a5..60a9abb 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -9,7 +9,8 @@ "protobuf", "boost-stl-interfaces", "rsm-binary-io", - "xbyak" + "xbyak", + "commonlibsse-ng-flatrim" ], "builtin-baseline": "687f4aab11df9b1a854d0d7207c558da545b4cc9" }