<div dir="ltr">Well,<div><br></div><div>Configuring the Debug Post Fix in the CMake command line works fine with me. I also use PCL and VTK 6.3.0.</div><div>This is the command line I use to build VTK</div><div><br></div><div>cmake -DCMAKE_DEBUG_POSTFIX=_d ../../Downloads/VTK-6.3.0</div><div><br></div><div>And the libraries are generated with _d suffix.</div><div><br></div><div>There is also the possibility of defining CMAKE_RELEASE_POSTFIX for a suffix to be added in the release libraries.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 10:16 PM, Chungzuwalla <span dir="ltr"><<a href="mailto:richard@research.canon.com.au" target="_blank">richard@research.canon.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I also needed to do this recently. I am no expert on CMake or VTK, but I was<br>
able to find a way that worked for me.<br>
I use PCL which uses VTK. PCL already uses different names for libraries<br>
(eg., pcl_xxx_debug.lib and pcl_xxx_release.lib).<br>
I wanted the PCL debug libs to link with VTK debug libs, and PCL release<br>
libs to link with VTK release libs.<br>
<br>
Find vtkModuleMacros.cmake, and find the line:<br>
set_property(TARGET ${_name} PROPERTY OUTPUT_NAME<br>
${_vtk}${_name}${_lib_suffix})<br>
I replaced this with:<br>
set_property(TARGET ${_name} PROPERTY DEBUG_OUTPUT_NAME<br>
${_vtk}${_name}${_lib_suffix}_d)<br>
set_property(TARGET ${_name} PROPERTY RELEASE_OUTPUT_NAME<br>
${_vtk}${_name}${_lib_suffix})<br>
<br>
The CMake documentation I referred to for these properties is here:<br>
<a href="https://cmake.org/cmake/help/v3.3/command/set_target_properties.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.3/command/set_target_properties.html</a><br>
See the paragraph starting “Properties that affect the name of a target’s<br>
output file are as follows”.<br>
<br>
Then I opened VTK build in CMake-gui, re-ran “configure”, re-ran “generate”<br>
Opened the updated VTK build files in my IDE (Visual Studio 2015) (using<br>
Administrator mode, so that the install can succeed)<br>
Rebuilt INSTALL using “debug” configuration, then again using “release”<br>
configuration<br>
Checked in the VTK install directory, both debug and release libraries are<br>
there side by side.<br>
<br>
Then repeated all that for PCL: “configure”, “generate”, INSTALL debug,<br>
INSTALL release.<br>
When I opened the updated PCL build files in the IDE, I could see that the<br>
debug build of PCL was linking the VTK libs with the “_d” suffix.<br>
Which is exactly what I wanted.<br>
<br>
A final note: my project which uses PCL, uses the Visual Studio IDE build<br>
system directly (not CMake).<br>
So in the debug build, I had to manually add the “_d” suffix to the VTK<br>
import libraries.<br>
Otherwise my executable would have loaded both release and debug versions<br>
of the same VTK DLL, causing chaos.<br>
<br>
Hope this helps.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Generate-debug-libraries-with-d-postfix-tp5736543p5736601.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/Generate-debug-libraries-with-d-postfix-tp5736543p5736601.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Thales Luis Rodrigues Sabino</div><div><br></div><div>PhD Student at <a href="http://www.ufjf.br/pgmc/" target="_blank">PGMC-UFJF</a></div><div><a href="http://lattes.cnpq.br/0601030410417146" target="_blank">Lattes</a> | <a href="https://br.linkedin.com/in/tluisrs" target="_blank">LinkedIn</a> | <a href="https://www.researchgate.net/profile/Thales_Luis_Sabino" target="_blank">ResearchGate</a></div></div></div></div></div>
</div></div>