Install dependencies:
.\vcpkg install leptonica:x64-windows-static
pip install pybind11Build with cmake
cmake -B build -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_FIND_LIBRARY_SUFFIXES=.lib -DBUILD_SHARED_LIBS=OFF -Dpybind11_DIR=D:\Python\Python312\Lib\site-packages\pybind11\share\cmake\pybind11
cmake --build build --config Release