<div dir="ltr"><div><div>Hello,</div><div><br></div><div>I would like to propose the following fix for bug 15183 (<a href="https://cmake.org/Bug/view.php?id=15183" target="_blank">https://cmake.org/Bug/view.php?id=15183</a>)</div><div><br></div><div>For some reason the XcodeGenerator seemed to be setting the INSTALL_PATH variable regardless of if it was initialized or not (which is done only for shared libraries). This seems almost certainly undesirable so I've moved the code inside the shared library check.</div><div><br></div><div>The fix is based on v3.4.1 tag.</div><div><br></div><div>---</div><div> Source/cmGlobalXCodeGenerator.cxx | 8 ++++----</div><div> 1 file changed, 4 insertions(+), 4 deletions(-)</div><div><br></div><div>diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx</div><div>index 33babec..089bb47 100644</div><div>--- a/Source/cmGlobalXCodeGenerator.cxx</div><div>+++ b/Source/cmGlobalXCodeGenerator.cxx</div><div>@@ -2329,10 +2329,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,</div><div>                                 this->CreateString(format));</div><div>     }</div><div> </div><div>-  // Create the INSTALL_PATH attribute.</div><div>-  std::string install_name_dir;</div><div>   if(target.GetType() == cmTarget::SHARED_LIBRARY)</div><div>     {</div><div>+<span style="white-space:pre-wrap">   </span>// Create the INSTALL_PATH attribute.</div><div>+<span style="white-space:pre-wrap">   </span>std::string install_name_dir;</div><div>     // Get the install_name directory for the build tree.</div><div>     install_name_dir = gtgt->GetInstallNameDirForBuildTree(configName);</div><div>     // Xcode doesn't create the correct install_name in some cases.</div><div>@@ -2356,9 +2356,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,</div><div>       extraLinkOptions += " -install_name ";</div><div>       extraLinkOptions += XCodeEscapePath(install_name.c_str());</div><div>       }</div><div>+<span style="white-space:pre-wrap">    </span>buildSettings->AddAttribute("INSTALL_PATH",</div><div>+<span style="white-space:pre-wrap">                                                                </span>this->CreateString(install_name_dir.c_str()));</div><div>     }</div><div>-  buildSettings->AddAttribute("INSTALL_PATH",</div><div>-                              this->CreateString(install_name_dir.c_str()));</div><div> </div><div>   // Create the LD_RUNPATH_SEARCH_PATHS</div><div>   cmComputeLinkInformation* pcli = gtgt->GetLinkInformation(configName);</div><div>-- </div><div>2.5.4 (Apple Git-61)</div><div><br></div></div><div><br></div><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b><span style="font-size:small">Marko Kylmamaa</span><br style="font-size:small"><span style="font-size:small">CTO</span></b><div><span style="font-size:small"><a href="http://www.reforgedstudios.com" target="_blank"><b>Reforged Studios</b></a></span><br></div><div><b>Cell:</b> <a href="tel:%2B1-949-872-9650" value="+19498729650" target="_blank">+1-949-872-9650</a></div><div><b>Skype:</b> mkylmamaa</div></div></div></div></div></div></div></div>
</div>