If I use target_link_libraries(Pro vtkCommonCore-9.0d ....) , the code would be ok for debug but wrong for release.
If I use target_link_libraries(Pro vtkCommonCore-9.0 ....) , the code would be ok for release but wrong for debug.
If I want to use fidn_package(VTK), I need to compile vtk in my computer. But, I donβt want to build vtk in my computer, and I just want to use vtk by bin/lib/include.
As stated above, you should copy the whole install tree. That will come with what you need to find_package(VTK). This includes the vtk_module_autoinit command youβll need to use if you use any object factories (commonly, rendering or MPI support).
By not providing "FIndVTK.cmake" in CMAKE_MODULE_PATH this project has asked CMAke to find a package configuration file provided by "VTK", but CMAke did not find one.
Could not find a package configuration file provided by "VTK" with any of the following names:
VTKConfig.cmake
vtk-config.cmake
Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR" to a directory containing one of the above files. If "VTK" provided a separate development package or SDK, be sure it has been installed.
How did you get such a setup? The CMake files should never be under a config-specific location unless you specified that manually. If you want a single install prefix with both, youβll need a single CMake package directory which knows about both.
Yes, I manually copy the dll/lib/include files to a config-specific location. The reason is that I want to include Debug/Release/RelWithDebInfo files.
If I do not copy dll/lib/include files to a config-specific location manually, I can distinguish the debug/release by suffix. But, how can I distinguish lib of release and RelWithDebInfo?
Right now, VTK doesnβt have a different suffix for release and relwithdebinfo built-in. You can pass -DCMAKE_RELWITHDEBINFO_POSTFIX=rd to the configure to make a different suffixes for that configuration. Then you should be able to have then entire setup in a unified config-less install tree.
By not providing "FIndVTK.cmake" in CMAKE_MODULE_PATH this project has asked CMAke to find a package configuration file provided by "VTK", but CMAke did not find one.
Could not find a package configuration file provided by "VTK" with any of the following names:
VTKConfig.cmake
vtk-config.cmake
Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR" to a directory containing one of the above files. If "VTK" provided a separate development package or SDK, be sure it has been installed.
CMake will take this literally, so it will never see x64. Youβll need to compute this based on whatever information you have and set a CMake variable appropriately.