| 50 | |
| 51 | = Informing CMake that the library is modular = |
| 52 | |
| 53 | The CMake build system needs to know that the layout of the Boost library follows the rules of a modular library, which also instructs it to add the appropriate include paths when compiling itself and any of its dependencies. To label the library as modular, edit the `CMakeLists.txt` file contained in the library's subdirectory (e.g., `libs/filesystem/CMakeLists.txt`, and add the argument `MODULAR` to the use of [wikiCMakeLibraryProject `boost_library_project`]. After this change, Filesystem library's `CMakeLists.txt` looks like this: |
| 54 | |
| 55 | {{{ |
| 56 | boost_library_project( |
| 57 | Filesystem |
| 58 | SRCDIRS src |
| 59 | TESTDIRS test |
| 60 | MODULAR |
| 61 | DESCRIPTION "Provides portable facilities to query and manipulate paths, files, and directories." |
| 62 | AUTHORS "Beman Dawes <bdawes -at- acm.org>" |
| 63 | ) |
| 64 | }}} |
| 65 | |
| 66 | If the library you're modularizing does not have `DESCRIPTION`, `AUTHORS`, or `MAINTAINERS` arguments, please add them! Short library descriptions are available at http://www.boost.org/doc/ along with author information; additional maintainer information can be found in http://svn.boost.org/svn/boost/trunk/libs/maintainers.txt. |
| 67 | |
| 68 | |