Fix CMake boost linking issue on AppVeyor MINGW
diff --git a/build/cmake/BoostMacros.cmake b/build/cmake/BoostMacros.cmake
index ffb85af..61fac03 100644
--- a/build/cmake/BoostMacros.cmake
+++ b/build/cmake/BoostMacros.cmake
@@ -17,6 +17,17 @@
 # under the License.
 #
 
+# CMake 4.0+ removed the FindBoost module (CMP0167). Use OLD behavior to
+# preserve compatibility with existing ${Boost_LIBRARIES} usage.
+if(POLICY CMP0167)
+  cmake_policy(SET CMP0167 OLD)
+endif()
+
+# Force using FindBoost instead of Boost's own BoostConfig.cmake.
+# BoostConfig.cmake does not populate ${Boost_LIBRARIES} the same way,
+# which causes linking failures on Windows.
+set(Boost_NO_BOOST_CMAKE ON)
+
 set(BOOST_MINREV 1.56)
 
 macro(REQUIRE_BOOST_HEADERS)