Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Boost headers to specific directory (Windows)

I've downloaded, extracted, and compiled the Boost libraries (including the separately compiled libraries). I've used their install procedure a couple times now but I can't seem to get it to do exactly what I want. Right now, when I install Boost after compiling it goes to

C:\Boost

This is fine. The compiled libs go to

C:\Boost\lib

which is also fine. The problem I have is with the installation of the precompiled headers. They got put at

C:\Boost\include\boost-1_54\boost

Is there a way to use the Boost build system and install tools to set the precompiled headers to be installed to just

C:\Boost\include

and not have the Boost version number be a part of that folder hierarchy?

I don't plan on using multiple versions of Boost at the same time so I don't have a use for actually having that version number. I realize I could move them manually after the install is complete, but I wanted to see first if I've overlooked or misunderstood something about Boost's build system.

like image 509
CraigularB Avatar asked Sep 11 '13 03:09

CraigularB


1 Answers

--layout=system removes the versioned subdirectory from the include path (as @IgorR. pointed out).

"Removing that second boost in the path" is a bad idea. In a respectable OS (cough...), the include files for various libraries are supposed to co-exist in one common include directory, hence the boost subdirectory to avoid clashes. Boost headers are therefore habitually referred to as e.g. #include <boost/any.hpp>, i.e. including that boost/ subdirectory.

This is done both by third-party software using Boost, and by Boost itself. If you remove the second boost from the path, you would end up with C:\Boost\include\any.hpp, and any Boost-using software won't compile as not even Boost could find its own includes.

like image 88
DevSolar Avatar answered Oct 03 '22 17:10

DevSolar