I'm trying to build Boost C++ libraries version 1.65.1 on Windows with zlib support. I'm using zlib library from Conan package with zlib which I built previously. I'm trying to understand the right steps for building boost with zlib support to use them for creating Conan recipe for boost. I tried to follow the instructions from the official boost documentation. I set the environment variables ZLIB_LIBRARY_PATH
, ZLIB_NAME
, and ZLIB_INCLUDE
the following way:
set ZLIB_LIBRARY_PATH=C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\lib
set ZLIB_NAME=zlibstat
set ZLIB_INCLUDE=C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\include
and the build command is:
.\b2.exe -j8 --prefix="C:\work\test_builds\boost\install\x64_shared_release" --build-dir="C:\work\test_builds\boost\build\x64_shared_release" --layout=system architecture=x86 address-model=64 toolset=msvc variant=release debug-symbols=on link=shared threading=multi runtime-link=shared install
The result was:
- zlib : no (cached)
I also tried to clear boost build cash between runs.
After this I tried to set the environment variables directly from the b2
build command:
.\b2.exe -j8 -sZLIB_LIBRARY_PATH="C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\lib"-sZLIB_NAME="zlibstat" -sZLIB_INCLUDE="C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\include" --prefix="C:\work\test_builds\boost\install\x64_shared_release" --build-dir="C:\work\test_builds\boost\build\x64_shared_release" --layout=system architecture=x86 address-model=64 toolset=msvc variant=release debug-symbols=on link=shared threading=multi runtime-link=shared install
The result was the same.
Finally I tried adding the options into project-config.jam
file the following way:
using zlib : 1.2.11 : <search>C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\lib <name>zlibstat <include>C:\Users\ivan.bobev\.conan\data\zlib\1.2.11\igsoft\stable\package\63da998e3642b50bee33f4449826b2d623661505\include ;
Again I have no success.
In the zlib include folder there is subfolder zlib. I also tried the 3 variants from above setting the path as "../include/zlib". No success again.
How to build Boost with zlib support using my pre-built Conan package with zlib?
zlib
support is a feature (or check docs) – Wenonawenonahzlibstat
? – NorwayZLIB_LIBRARY_PATH
directory. – Shote