On Fri, Oct 7, 2016 at 9:06 AM, Vinnie Falco
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: https://github.com/Kitware/CMake/blob/master/Modules/FindOpenSSL.cmake
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) < https://svn.boost.org/svn/boost/sandbox/tools/build_extensions/ext/>. 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 < https://github.com/boostorg/build/blob/develop/src/contrib/modular.jam>. 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/assert//library /boost/core//library ; modular.external /boost/config : /boost/predef//library ; modular.external /boost/filesystem : /boost/type_traits//library /boost/iterator//library /boost/smart_ptr//library /boost/io//library /boost/functional//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 < https://github.com/boostorg/build/blob/develop/src/tools/zlib.jam>. -- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail