From f460ab215298d611e7d9438df6b01175f58eb072 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 16 Mar 2021 01:34:27 +0000 Subject: [PATCH] MSVC: Fix build with vcpkg's boost boost-zlib is not present (nor needed) in vcpkg version of boost There, it is part of boost-iostreams instead. This was previously reported in: https://gitlab.com/OpenMW/openmw/-/merge_requests/213#note_348625016 --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa1194205..ad35d1b0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,7 +344,9 @@ set(BOOST_COMPONENTS system filesystem program_options iostreams) if(WIN32) set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale) if(MSVC) - set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib) + # 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) @@ -354,7 +356,7 @@ endif() set(Boost_NO_BOOST_CMAKE ON) -find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) +find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS}) if(OPENMW_USE_SYSTEM_MYGUI) find_package(MyGUI 3.2.2 REQUIRED) endif()