Search code examples
boostboost-buildbjam

Multiple Boost.Build projects


I have two projects using Boost.Build engine, with the following structure:

|_Project 1
| |_Source files
| |_Jamroot.jam
|
|_Project 2
| |_Source files
| |_Jamroot.jam

How can I trigger the build process of project 1 from project 2, and in addition link to the dynamic library that was generated in project 1?


Solution

  • I don't remember how to build the entire project 1, but for linking, you can refer to the target in the project1 as //library_project_from_1.

    So if project1/Jamroot.jam looks like

    lib first_library
        : # sources, etc...
        ;
    

    Try referring to it from project2/Jamroot.jam as

    exe second_program
        : # sources
        : ../project1//first_library
        ;