[vtkusers] How to FindVTK libraries with debug suffix
Kenneth Porter
shiva at sewingwitch.com
Thu Feb 18 19:31:18 EST 2010
I'm building VTK debug libraries with a "_d" suffix so that I can have both
release and debug versions readily available when building my apps. But
when building an example app using a CMakeLists.txt file, I find I need to
edit the resulting Visual Studio 2008 project file to add the debug suffix
to the library references, or the app crashes because it's using the wrong
libraries.
It looks like CMake is getting the ability to locate libraries with debug
suffixes:
<http://www.cmake.org/pipermail/cmake/2010-February/035055.html>
What would be involved in adding this to the VTK build machinery?
For reference, here's how I'm currently building VTK:
Unpack VTK to g:\devel\vtk\vtk-5.4.2.
cd g:\devel\vtk\output\vs9
cmake -D CMAKE_DEBUG_POSTFIX="_d" -D CMAKE_INSTALL_PREFIX=G:/devel/VTK/vs9
-D VTK_DEBUG_LEAKS=ON -G "Visual Studio 9 2008" ..\..\vtk-5.4.2
@rem build debug and release versions with VS2008
cd g:\devel\vtk\output\vs8
cmake -D CMAKE_DEBUG_POSTFIX="_d" -D CMAKE_INSTALL_PREFIX=G:/devel/VTK/vs8
-D VTK_DEBUG_LEAKS=ON -G "Visual Studio 8 2005" ..\..\vtk-5.4.2
@rem build debug and release versions with VS2005
To build an example from the wiki, I copy the files from the wiki to
g:\devel\appname\src, cd to g:\devel\appname\bin, and run:
cmake -D CMAKE_DEBUG_POSTFIX="_d" -D VTK_DEBUG_LEAKS=ON -D
VTK_DIR="g:/devel/VTK/vs9/lib/vtk-5.4" -G "Visual Studio 9 2008" ../src
More information about the vtkusers
mailing list