Fix build with lld linker

Boost.Filesystem started to depend on Boost.Atomic on 1.77.0 version but lld
can't find library on its own:

libboost_atomic.so.1.79.0 => not found
fix/shrink_builds
elsid 3 years ago
parent 42841002b5
commit ea295a2ac3
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -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()

@ -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)

Loading…
Cancel
Save