| 1764 | } |
| 1765 | |
| 1766 | std::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 | |
| 1794 | std::string cmGeneratorTarget::GetInstallNameDirForInstallTree( |
| 1795 | std::string const& config, std::string const& installPrefix) const |
no test coverage detected