<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello<div>I know that the usage of relatives path out of the sources seems to be not an easy one.</div><div>But maybe you can give me a workaround.</div><div><br></div><div>We use following directory structure</div><div><br></div><div><font class="Apple-style-span" face="Courier">- dev </font></div><div><font class="Apple-style-span" face="Courier"> |--project1: CMakeLists.txt</font></div><div><font class="Apple-style-span" face="Courier"> | main.cpp</font></div><div><font class="Apple-style-span" face="Courier"> | stdafx.h</font></div><div><font class="Apple-style-span" face="Courier"> | project1.vcproj</font></div><div><font class="Apple-style-span" face="Courier"> | ... </font></div><div><font class="Apple-style-span" face="Courier"><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> --project2: CMakeLists.txt</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | main.cpp</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | stdafx.h</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | project2.vcproj</font></div> | ... </font></div><div><font class="Apple-style-span" face="Courier"><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> --folder3</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | |</font><span class="Apple-style-span" style="font-family: Courier; ">------- project3: CMakeLists.txt</span></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | main.cpp</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | stdafx.h</font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"><div style="font-family: Helvetica; "><font class="Apple-style-span" face="Courier"> | project3.vcproj</font></div> | ... </font></div><div><font class="Apple-style-span" face="Courier"> |--sharedSrc </font></div><div><font class="Apple-style-span" face="Courier"> |</font></div><div><font class="Apple-style-span" face="Courier"> |-- folder1: *.cxx; *.h</font></div><div><font class="Apple-style-span" face="Courier"><div><font class="Apple-style-span" face="Courier"><div><font class="Apple-style-span" face="Courier"> |</font></div> |-- folder2: *.cxx; *.h</font></div><div><font class="Apple-style-span" face="Courier"><div><font class="Apple-style-span" face="Courier"><div><font class="Apple-style-span" face="Courier"> |</font></div> |-- folder4: *.cxx; *.h</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Ok. As you can see, we are building the vcproj inside the project folders. source and binary path are identical. The problem is that all file paths to files in shared are absolute. Yes, I read the FAQ, yes, I see that's the philosophy of CMake. But our vcproj is also in the hg-repository for nightly builds and the dev dir is located in another directory and drive. The 3rd party dependencies are the same. So it doesn't work without reconfigure.</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Second point is: sometimes the dev will be cloned again or the dev dir will be renamed. In worst case we change the source code in dev even by opening the vcproj in dev2, because the files point to dev!!! using relative paths to dev would avoid that.</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Do you have an idea how the problem can be avoided without reconfiguring. Especially the renaming stuff happens quite often inside the developement. Maybe the source root can be redirected to dev somehow while using the CMakeList.txt of an specific subfolder?</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">Best regards,</font></div><div><font class="Apple-style-span" face="Courier">SirAnn</font></div><div><font class="Apple-style-span" face="Courier"><br></font></div></font></div></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div></font></div></font></div><div><br></div></body></html>