Skip to content

Commit

Permalink
Remove vestigial Boost libraries
Browse files Browse the repository at this point in the history
Boost::zlib is basically part of Boost::iostreams, and depending on how you configure Boost, it can either be a separate library or get embedded into iostreams.
With the third-party-but-linked-on-Boost's-website package we've been using for years, it's a separate library.
Before https://gitlab.com/OpenMW/openmw/-/merge_requests/4307, we needed to explicitly link with it as CMake wasn't handling transitive dependencies for us.
With vcpkg, it's embedded, and doesn't have its own CMake config, so we couldn't explicitly link with it even if we wanted to.

Now CMake *is* handling transitive dependencies for us, we don't even need to think about this library.
It's all automatic.

Boost::locale, on the other hand, used to be something we used directly (I think for doing UTF-16/UTF-8 conversions when dealing with Windows paths).
However, it isn't anymore, and we just didn't purge it from our CMake when we should have.
It can go.
  • Loading branch information
AnyOldName3 committed Aug 22, 2024
1 parent 56d768c commit 3977cf3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,6 @@ if(HAVE_MULTIVIEW)
endif(HAVE_MULTIVIEW)

set(BOOST_COMPONENTS iostreams program_options system)
if(WIN32)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale)
if(MSVC)
# boost-zlib is not present (nor needed) in vcpkg version of boost.
# there, it is part of boost-iostreams instead.
set(BOOST_OPTIONAL_COMPONENTS zlib)
endif(MSVC)
endif(WIN32)

find_package(Boost 1.70.0 CONFIG REQUIRED COMPONENTS ${BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS})

Expand Down
2 changes: 0 additions & 2 deletions apps/mwiniimporter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ target_link_libraries(openmw-iniimporter
)

if (WIN32)
target_link_libraries(openmw-iniimporter
Boost::locale)
INSTALL(TARGETS openmw-iniimporter RUNTIME DESTINATION ".")
endif(WIN32)

Expand Down
1 change: 0 additions & 1 deletion apps/opencs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ else()
endif()

if (WIN32)
target_link_libraries(openmw-cs-lib Boost::locale)
target_sources(openmw-cs PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/openmw-cs.exe.manifest)
endif()

Expand Down
6 changes: 0 additions & 6 deletions components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,6 @@ endif()

target_link_libraries(components ${BULLET_LIBRARIES})

if (WIN32)
target_link_libraries(components
Boost::locale
Boost::zlib)
endif()

if (USE_QT)
add_library(components_qt STATIC ${COMPONENT_QT_FILES} ${ESM_UI_HDR})
target_link_libraries(components_qt components Qt::Widgets Qt::Core)
Expand Down
1 change: 0 additions & 1 deletion components/platform/file.win32.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "file.hpp"

#include <boost/locale.hpp>
#include <cassert>
#include <components/misc/windows.hpp>
#include <stdexcept>
Expand Down

0 comments on commit 3977cf3

Please sign in to comment.