[SOLVED] Combining Qt 5.4.2 and VTK 6.2.0 using CMake 3.2.3
Hello everyone! I'm trying to use Qt 5.4 with the VTK 6.2 libraries. I'm not an expert and I follow every tutorial I've found but some doubts remain.
This is what I've done:
-Install Qt 5.4.2
-Download VTK 6.2.0
-Download CMake 3.2.3
-Set up the source directory (C:\VTK\VTK-6.2.0\VTK-6.2.0) and the build directory (C:\VTK\VTKbuild) in CMake
-Set up variable environment:
QTDIR = C:\Qt\5.4
Path = C:\CMake\cmake-3.2.3-win32-x86\bin;C:\Qt\5.4\msvc2013_64\bin
-Press configure in CMake
-Check the following options in CMake:
VTK_Group_Qt = true
BUILD_SHARED_LIBS = true
-Added the following options in CMake:
CMAKE_PREFIX_PATH = C:\Qt\5.4\msvc2013_64
VTK_QT_VERSION = 5
QT_QMAKE_EXECUTABLE = C:/Qt/5.4/msvc2013_64/bin/qmake.exe
-Build the file VTK.sln with Visual Studio 2013 in release mode
Has anyone tried this method? It's correct? I'm still trying to figure out how to use VTK libraries VTK in a Qt project but for now I just need to know if the procedure is correct. Thank you for your help!
Hi and welcome to devnet,
From a quick look it seems good except for two points:
- AFAIK, your don't need to set QTDIR.
- Don't modify PATH to add Qt in it, doing so means that all other software on your computer that uses Qt dlls would pick these and it's not something you want.
@SGaist Thank you! I'm sorry if i reply so late!
Now i try to follow your advices. ;)