diff --git a/source/MRViewer/CMakeLists.txt b/source/MRViewer/CMakeLists.txt index 8be42d6e82d5..af5409f0edf0 100644 --- a/source/MRViewer/CMakeLists.txt +++ b/source/MRViewer/CMakeLists.txt @@ -107,7 +107,15 @@ IF(NOT MRVIEWER_NO_VOXELS) ENDIF() IF(NOT MRVIEWER_NO_LOCALE) - find_package(Boost COMPONENTS locale REQUIRED) + # Emscripten's Boost package doesn't contain CMake config files + IF(EMSCRIPTEN) + IF(POLICY CMP0167) + cmake_policy(SET CMP0167 OLD) + ENDIF() + find_package(Boost COMPONENTS locale REQUIRED) + ELSE() + find_package(Boost CONFIG COMPONENTS locale REQUIRED) + ENDIF() target_link_libraries(${PROJECT_NAME} PRIVATE Boost::locale) ENDIF()