diff --git a/CMakeLists.txt b/CMakeLists.txt index de0469c7c9..074b1bcd33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -432,6 +432,11 @@ endif() set(Boost_NO_BOOST_CMAKE ON) find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS}) + +if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0) + find_package(Boost 1.77.0 REQUIRED COMPONENTS atomic) +endif() + if(OPENMW_USE_SYSTEM_MYGUI) find_package(MyGUI 3.4.1 REQUIRED) endif() diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 3ec86df232..20ea6f7452 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -145,7 +145,6 @@ target_link_libraries(openmw ${OSG_LIBRARIES} ${Boost_SYSTEM_LIBRARY} - ${Boost_THREAD_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${OPENAL_LIBRARY} diff --git a/apps/openmw/mwworld/manualref.cpp b/apps/openmw/mwworld/manualref.cpp index 6afb3e4142..42771bc72c 100644 --- a/apps/openmw/mwworld/manualref.cpp +++ b/apps/openmw/mwworld/manualref.cpp @@ -6,7 +6,7 @@ namespace { template - void create(const MWWorld::Store& list, const std::string& name, boost::any& refValue, MWWorld::Ptr& ptrValue) + void create(const MWWorld::Store& list, const std::string& name, std::any& refValue, MWWorld::Ptr& ptrValue) { const T* base = list.find(name); @@ -26,7 +26,7 @@ namespace MWWorld::LiveCellRef ref(cellRef, base); refValue = ref; - ptrValue = MWWorld::Ptr(&boost::any_cast&>(refValue), nullptr); + ptrValue = MWWorld::Ptr(&std::any_cast&>(refValue), nullptr); } } diff --git a/apps/openmw/mwworld/manualref.hpp b/apps/openmw/mwworld/manualref.hpp index 84aa0751f2..593df9f24f 100644 --- a/apps/openmw/mwworld/manualref.hpp +++ b/apps/openmw/mwworld/manualref.hpp @@ -1,7 +1,7 @@ #ifndef GAME_MWWORLD_MANUALREF_H #define GAME_MWWORLD_MANUALREF_H -#include +#include #include "ptr.hpp" @@ -10,7 +10,7 @@ namespace MWWorld /// \brief Manually constructed live cell ref class ManualRef { - boost::any mRef; + std::any mRef; Ptr mPtr; ManualRef (const ManualRef&); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 8e7f1bbfa5..ad6bddee82 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -411,6 +411,10 @@ target_link_libraries(components yaml-cpp ) +if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0) + target_link_libraries(components ${Boost_ATOMIC_LIBRARY}) +endif() + target_link_libraries(components ${BULLET_LIBRARIES}) if (WIN32) diff --git a/extern/osg-ffmpeg-videoplayer/CMakeLists.txt b/extern/osg-ffmpeg-videoplayer/CMakeLists.txt index 8ab51196a8..ae19be8659 100644 --- a/extern/osg-ffmpeg-videoplayer/CMakeLists.txt +++ b/extern/osg-ffmpeg-videoplayer/CMakeLists.txt @@ -12,7 +12,7 @@ set(OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES include_directories(${FFmpeg_INCLUDE_DIRS}) add_library(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} STATIC ${OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES}) -target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${FFmpeg_LIBRARIES} ${Boost_THREAD_LIBRARY}) +target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${FFmpeg_LIBRARIES}) target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${OSG_LIBRARIES}) link_directories(${CMAKE_CURRENT_BINARY_DIR})