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

Method GetInstallNameDirForInstallTree

Source/cmGeneratorTarget.cxx:1794–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1792}
1793
1794std::string cmGeneratorTarget::GetInstallNameDirForInstallTree(
1795 std::string const& config, std::string const& installPrefix) const
1796{
1797 if (this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) {
1798 std::string dir;
1799 cmValue install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
1800
1801 if (this->CanGenerateInstallNameDir(INSTALL_NAME_FOR_INSTALL)) {
1802 if (cmNonempty(install_name_dir)) {
1803 dir = *install_name_dir;
1804 cmGeneratorExpression::ReplaceInstallPrefix(dir, installPrefix);
1805 dir =
1806 cmGeneratorExpression::Evaluate(dir, this->LocalGenerator, config);
1807 if (!dir.empty()) {
1808 dir = cmStrCat(dir, '/');
1809 }
1810 }
1811 }
1812 if (!install_name_dir) {
1813 if (this->MacOSXRpathInstallNameDirDefault()) {
1814 dir = "@rpath/";
1815 }
1816 }
1817 return dir;
1818 }
1819 return "";
1820}
1821
1822cmListFileBacktrace cmGeneratorTarget::GetBacktrace() const
1823{

Callers 5

InstallNameDirMethod · 0.80
InstallNameDirMethod · 0.80
InstallNameDirMethod · 0.80

Calls 7

GetPropertyMethod · 0.95
cmNonemptyFunction · 0.85
cmStrCatFunction · 0.70
IsOnMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected