Boost logo

Boost :

Subject: Re: [boost] Build: Trying to get Boost.Build toseemyOpenSSLonWindows
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2016-10-07 10:32:45

On Fri, Oct 7, 2016 at 9:06 AM, Vinnie Falco <vinnie.falco_at_[hidden]> wrote:

> I just got CMake working to find my OpenSSL installation and let me
> tell you, it was a breeze. First of all you need to install OpenSSL
> for Windows. I used 1.0.2j. The 1.1.0 series doesn't work since they
> changed all the filenames around.

If it where truly easy it would work regardless of version ;-)

> Then you just add this line to your CMakeLists.txt:
> find_package(OpenSSL)
> WHAT!? That's it? Yeah. It should be this easy in a Jamfile. You can
> have both 32 and 64 bit OpenSSL libraries installed. And it correctly
> links against the debug libraries if you are building a debug
> executable.
> How does CMake do it? There's a nifty little program called
> FindOpenSSL. The source is here:
> I'm wondering, does Boost.Build already have such a system? And if
> not, could it be done? How would something like that look? I'm
> interested in exploring the possibilities here.

We have at least two. I used to maintain a set of "extensions" for
libraries that could be built from their sources (or some binaries) <>. Not
sure if that still works, but it probably does. And for projects that
already have Boost Build as the build system there's also the "modular"
utility <>. It
lets you put something like this in your Jamroot (or any other project file
like user-congi.jam):

import modular ;

modular.add-location libs/boost /boost ;

modular.external /boost/system
: /boost/config//library
/boost/core//library ;

modular.external /boost/config
: /boost/predef//library ;

modular.external /boost/filesystem
: /boost/type_traits//library
/boost/range//library ;

modular.external /boost/type_traits
: /boost/mpl//library
/boost/detail//library ;

modular.external /boost/mpl
: /boost/preprocessor//library ;

modular.external /boost/iterator
: /boost/static_assert//library ;

modular.external /boost/smart_ptr
: /boost/throw_exception//library ;

And then you can reference in your b2 targets dependencies to
"/boost/smart_ptr//library/<link>static" for example. And of course you can
write your own custom support for anything using the regular "using"
mechanism of b2. For example <>.

-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams -
-- rrivera/ (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

Boost list run by bdawes at, gregod at, cpdaniel at, john at