ENH: Support linking to shared libs with dependent libs

- Split IMPORTED_LINK_LIBRARIES into two parts:
      IMPORTED_LINK_INTERFACE_LIBRARIES
      IMPORTED_LINK_DEPENDENT_LIBRARIES
  - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior
  - Set mode to LINK for Darwin (fixes universal binary problem)
  - Update ExportImport test to account for changes
This commit is contained in:
Brad King
2008-01-31 15:45:31 -05:00
parent 52e75800b4
commit 2cff26fa52
11 changed files with 345 additions and 97 deletions
+7 -8
View File
@@ -35,9 +35,13 @@ struct cmTargetLinkInformationMap:
~cmTargetLinkInformationMap();
};
struct cmTargetLinkInterface: public std::vector<std::string>
struct cmTargetLinkInterface
{
typedef std::vector<std::string> derived;
// Libraries listed in the interface.
std::vector<std::string> Libraries;
// Shared library dependencies needed for linking on some platforms.
std::vector<std::string> SharedDeps;
};
struct cmTargetLinkInterfaceMap:
@@ -218,11 +222,6 @@ public:
bool IsImported() const {return this->IsImportedTarget;}
/** Get link libraries for the given configuration of an imported
target. */
std::vector<std::string> const*
GetImportedLinkLibraries(const char* config);
/** Get the library interface dependencies. This is the set of
libraries from which something that links to this target may
also receive symbols. Returns 0 if the user has not specified
@@ -487,7 +486,7 @@ private:
std::string Location;
std::string SOName;
std::string ImportLibrary;
std::vector<std::string> LinkLibraries;
cmTargetLinkInterface LinkInterface;
};
typedef std::map<cmStdString, ImportInfo> ImportInfoMapType;
ImportInfoMapType ImportInfoMap;