ENH: Implemented link-interface specification feature.

- Shared libs and executables with exports may now have
    explicit transitive link dependencies specified
  - Created LINK_INTERFACE_LIBRARIES and related properties
  - Exported targets get the interface libraries as their
    IMPORTED_LINK_LIBRARIES property.
  - The export() and install(EXPORT) commands now give
    an error when a linked target is not included since
    the user can change the interface libraries instead
    of adding the target.
This commit is contained in:
Brad King
2008-01-30 17:25:52 -05:00
parent 22be36f8d5
commit 7902bc06aa
10 changed files with 273 additions and 44 deletions

View File

@@ -19,6 +19,8 @@
#include "cmExportFileGenerator.h"
class cmExportCommand;
/** \class cmExportBuildFileGenerator
* \brief Generate a file exporting targets from a build tree.
*
@@ -31,12 +33,17 @@
class cmExportBuildFileGenerator: public cmExportFileGenerator
{
public:
cmExportBuildFileGenerator();
/** Set the list of targets to export. */
void SetExports(std::vector<cmTarget*> const* exports)
{ this->Exports = exports; }
/** Set whether to append generated code to the output file. */
void SetAppendMode(bool append) { this->AppendMode = append; }
/** Set the command instance through which errors should be reported. */
void SetCommand(cmExportCommand* cmd) { this->ExportCommand = cmd; }
protected:
// Implement virtual methods from the superclass.
virtual bool GenerateMainFile(std::ostream& os);
@@ -52,6 +59,7 @@ protected:
ImportPropertyMap& properties);
std::vector<cmTarget*> const* Exports;
cmExportCommand* ExportCommand;
};
#endif