mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
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:
+7
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user