MCPcopy Create free account
hub / github.com/Kitware/CMake / GetInstallNameDirForBuildTree

Method GetInstallNameDirForBuildTree

Source/cmGeneratorTarget.cxx:1766–1792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1764}
1765
1766std::string cmGeneratorTarget::GetInstallNameDirForBuildTree(
1767 std::string const& config) const
1768{
1769 if (this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) {
1770
1771 // If building directly for installation then the build tree install_name
1772 // is the same as the install tree.
1773 if (this->MacOSXUseInstallNameDir()) {
1774 std::string installPrefix =
1775 this->Makefile->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
1776 return this->GetInstallNameDirForInstallTree(config, installPrefix);
1777 }
1778
1779 // Use the build tree directory for the target.
1780 if (this->CanGenerateInstallNameDir(INSTALL_NAME_FOR_BUILD)) {
1781 std::string dir;
1782 if (this->MacOSXRpathInstallNameDirDefault()) {
1783 dir = "@rpath";
1784 } else {
1785 dir = this->GetDirectory(config);
1786 }
1787 dir += "/";
1788 return dir;
1789 }
1790 }
1791 return "";
1792}
1793
1794std::string cmGeneratorTarget::GetInstallNameDirForInstallTree(
1795 std::string const& config, std::string const& installPrefix) const

Callers 8

CreateBuildSettingsMethod · 0.80
InstallNameDirMethod · 0.80
InstallNameDirMethod · 0.80
WriteLibraryRulesMethod · 0.80
WriteLinkStatementMethod · 0.80

Calls 6

GetDirectoryMethod · 0.95
IsOnMethod · 0.45

Tested by

no test coverage detected