35 | | 4. Build Boost: Like configuration, the way in which one builds Boost with CMake differs from one platform to another, depending on |
| 35 | 4. Build Boost: Like configuration, the way in which one builds Boost with CMake differs from one platform to another, depending on your platform and how you configured CMake. Either way, you'll be using the tools provided to you by your compiler or operating system vendor. |
| 36 | a. '''Microsoft Visual Studio''': If you have generated project files for Microsoft Visual Studio, you will need to start up Visual Studio to build Boost. Once Visual Studio has loaded, load the solution or project`Boost` from the Boost binary directory you set in the CMake configuration earlier. Then, just click "Build" to build all of Boost. |
| 37 | a. '''On Unix''' (and when using makefile variants on Microsoft Windows): If you are on Unix, you will build Boost using standard "make" tools. Change into the binary directory we created and configured earlier, than run `make`: |
| 38 | {{{ |
| 39 | make |
| 40 | }}} |
| 41 | |
| 42 | 5. That's it! Once the build completes (which make take a while, if you are building all of the Boost libraries), the Boost libraries will be available in the `lib` subdirectory of your binary directory, ready to be used, installed, or packaged. |
| 43 | |
| 44 | == Installing Boost == |
| 45 | The installation of Boost's headers and compiled libraries uses the same tools as building the library. With Microsoft Visual Studio, just load the Boost solution or project and build the 'INSTALL' target to perform the installation. Unix and makefile users will change into the Boost binary directory and use the `install` make target, e.g., |
| 46 | {{{ |
| 47 | make install |
| 48 | }}} |
| 49 | |
| 50 | == Packaging Boost == |
| 51 | CMake can easily build binary packages for a variety of platforms. On Windows and Mac OS X, CMake builds graphical installation programs. For other Unix operating systems, CMake currently builds tarballs and self-installing shell scripts. This CMake functionality, providing by the CPack program that is part of CMake, is used to create all of the CMake's binary installers. |
| 52 | |
| 53 | Building binary installation packages with CMake is similar to installing Boost. On Windows, one must first download and install the [http://nsis.sourceforge.net/Main_Page Nullsoft Scriptable Install System (NSIS)]. Then, using Microsoft Visual Studio, one loads the Boost project/solution and build the `PACKAGE` target to generate the graphical installer. On Mac OS X, other Unix platforms, and on Windows when using a makefile generator, change into the Boost binary directory and use the `package` make target, e.g., |
| 54 | {{{ |
| 55 | make package |
| 56 | }}} |
| 57 | |
| 58 | Once this process completes, you will have several binary installers for you platform. |