I want to use vtk in my team projection. I firstly install vtk, and collect the necessary dll, and the fold is:
Thirdparty
VTK
bin
Debug
xxx.dll
...
Release
xxx.dll
...
include
xxx
...
lib
Debug
xxx
...
Release
...
In my CMakeLists.txt:
set(VTI_DIR "xxx/Thirdparty/VTK")
include_directories(
${VTK_DIR}/include
)
target_link_libraries(Pro
vtkCommonCore-9.0
....
)
For VTK 8, the CMakeLists.txt is OK, but it cause bug for vtk 9.0.
The target_link_libraries(Pro vtkCommonCore-9.0 ....)
is OK for release, but it is wrong for debug. Because, the dll is vtkCommonCore-9.0d
for debug. The dll of debug has a more d
than that of release.
If I use target_link_libraries(Pro vtkCommonCore-9.0d ....)
, the code would be ok for debug but wrong for release.
Can I remove the d
in the dll of debug?
How can I fix this problem? Any suggestion is appreciated~~~