<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>On 05/08/2011 07:35 AM, Bo Zhou wrote:</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> Hello all,</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> I am dealing with a problem about the
output path. At present I just do</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> like this,</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_INSTALL_PREFIX}/bin")</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
"${CMAKE_INSTALL_PREFIX}/lib")</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> And in fact the full path will be</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i>
"${CMAKE_INSTALL_PREFIX}/bin/{Debug|Release}/", the all .exe .dll
.pdb</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> files will be generated there.</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> Now I have a DLL target which should be in
bin/plugins, I try a way</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> which generates {Debug|Release} folders
under the bin folder, that's</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> unnecessary.</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> I prefer a more clear output directory
structure like</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i>
${CMAKE_INSTALL_PREFIX}/{Debug|Release}/bin/plugin, how should I do ?</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> </i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>><i> Thanks !</i></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>You shouldn't use the CMAKE_*_OUTPUT_DIRECTORY
variables to write</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>your project's binaries to their final
installation directory under</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>CMAKE_INSTALL_PREFIX. Instead, provide appropriate
INSTALL() commands</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>for each target and make use of INSTALL()'s CONFIGURATIONS
clause, e.g.</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>INSTALL(TARGETS plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> RUNTIME
DESTINATION Debug/bin/plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> LIBRARY
DESTINATION Debug/lib/plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>
CONFIGURATIONS Debug)</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>INSTALL(TARGETS plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> RUNTIME
DESTINATION Release/bin/plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> LIBRARY
DESTINATION Release/lib/plugin</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>
CONFIGURATIONS Release)</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">>etc. for further configurations and other targets
to be installed.</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">></span><span style="font-size:10pt;font-family:'Courier New'">Regards,</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">></span><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">></span><span style="font-size:10pt;font-family:'Courier New'">Michael</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">Hello, </span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">doing this for me only writes the target “plugin” for one
config cmake_config.cmake. Then one need to rebuild cmake_config each time.</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">I’m using CMake 2.8.7 under Windows and Visual studio.</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">Is it a known issue? Any idea about a fix?</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">Regards,</span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:10pt;font-family:'Courier New'">Erwan</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>