diff options
author | Brad King <brad.king@kitware.com> | 2008-01-31 20:45:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-31 20:45:31 (GMT) |
commit | 2cff26fa52cf9043f00d1efaaf31ab93e2db22e8 (patch) | |
tree | 4d403a91a70594893fc6b303a9cf693d4e538a9d /Source/cmComputeLinkInformation.h | |
parent | 52e75800b4731692f1e311f0d8701875ac98c96d (diff) | |
download | CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.zip CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.tar.gz CMake-2cff26fa52cf9043f00d1efaaf31ab93e2db22e8.tar.bz2 |
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
Diffstat (limited to 'Source/cmComputeLinkInformation.h')
-rw-r--r-- | Source/cmComputeLinkInformation.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 4ca3afa..2bbe05d 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -58,7 +58,7 @@ public: std::string GetChrpathTool(); std::set<cmTarget*> const& GetSharedLibrariesLinked(); private: - void AddItem(std::string const& item, cmTarget* tgt); + void AddItem(std::string const& item, cmTarget* tgt, bool isSharedDep); // Output information. ItemVector Items; @@ -78,6 +78,14 @@ private: const char* Config; const char* LinkLanguage; + // Modes for dealing with dependent shared libraries. + enum SharedDepMode + { + SharedDepModeNone, // Drop + SharedDepModeDir, // Use in runtime information + SharedDepModeLink // List file on link line + }; + // System info. bool UseImportLibrary; const char* LoaderFlag; @@ -88,6 +96,7 @@ private: std::string RuntimeSep; std::string RuntimeAlways; bool RuntimeUseChrpath; + SharedDepMode SharedDependencyMode; // Link type adjustment. void ComputeLinkTypeInfo(); @@ -134,6 +143,7 @@ private: void AddLinkerSearchDirectories(std::vector<std::string> const& dirs); std::set<cmStdString> DirectoriesEmmitted; std::set<cmStdString> ImplicitLinkDirs; + std::vector<std::string> SharedDependencyDirectories; // Linker search path compatibility mode. std::vector<std::string> OldLinkDirs; |