From 57bcb3e89db16d8dc33e6571ff1516ee599ef98a Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 18 Aug 2023 12:13:59 +0200 Subject: [PATCH 1/2] Fix build apps/openmw/mwlua/soundbindings.cpp:166:78: error: member access into incomplete type 'MWBase::World' const SoundStore* soundStore = &MWBase::Environment::get().getWorld()->getStore().get(); ^ apps/openmw/mwlua/../mwbase/environment.hpp:27:11: note: forward declaration of 'MWBase::World' class World; ^ --- apps/openmw/mwlua/soundbindings.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwlua/soundbindings.cpp b/apps/openmw/mwlua/soundbindings.cpp index 7f3bdc0ecf..9730960c6f 100644 --- a/apps/openmw/mwlua/soundbindings.cpp +++ b/apps/openmw/mwlua/soundbindings.cpp @@ -1,16 +1,15 @@ #include "soundbindings.hpp" -#include "luabindings.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/soundmanager.hpp" -#include "../mwbase/windowmanager.hpp" +#include "../mwbase/world.hpp" + +#include "../mwworld/esmstore.hpp" #include #include #include -#include "../mwworld/esmstore.hpp" - #include "luamanagerimp.hpp" namespace MWLua @@ -161,9 +160,7 @@ namespace MWLua }, []() { return MWBase::Environment::get().getSoundManager()->sayActive(MWWorld::ConstPtr()); }); - // Sound store using SoundStore = MWWorld::Store; - const SoundStore* soundStore = &MWBase::Environment::get().getWorld()->getStore().get(); sol::usertype soundStoreT = lua.new_usertype("ESM3_SoundStore"); soundStoreT[sol::meta_function::to_string] = [](const SoundStore& store) { return "ESM3_SoundStore{" + std::to_string(store.getSize()) + " sounds}"; }; @@ -176,7 +173,7 @@ namespace MWLua soundStoreT[sol::meta_function::pairs] = lua["ipairsForArray"].template get(); soundStoreT[sol::meta_function::ipairs] = lua["ipairsForArray"].template get(); - api["sounds"] = soundStore; + api["sounds"] = &MWBase::Environment::get().getWorld()->getStore().get(); // Sound record auto soundT = lua.new_usertype("ESM3_Sound"); From db16caa963cc8205be343a380ebc31d1daa94fdc Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 18 Aug 2023 13:53:25 +0200 Subject: [PATCH 2/2] Support yaml-cpp 0.8.0 --- components/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 32482ec331..628a97265a 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -520,10 +520,15 @@ target_link_libraries(components SQLite::SQLite3 smhasher ${ICU_LIBRARIES} - yaml-cpp ZLIB::ZLIB ) +if(yaml-cpp_VERSION VERSION_GREATER_EQUAL 0.8.0) + target_link_libraries(components yaml-cpp::yaml-cpp) +else() + target_link_libraries(components yaml-cpp) +endif() + if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0) target_link_libraries(components ${Boost_ATOMIC_LIBRARY}) endif()