VTK6.2 Qt5.4.0 VS2013
2015-11-19 21:46
585 查看
Building VTK6 + Qt5 with Visual Studio
Download
Download VTK 6.1.0 the (VTK-6.1.0.zip) to unzip the file. (C: \ VTK-6.1.0)Http://Www.Vtk.Org/VTK/resources/software.Html#latestcand Https://Github.Com/Kitware/VTK/tree/v6.1.0
Qt 5.4.0 with OpenGLをダウンロード、インストールする。(C:\Qt)
http://www.qt.io/download-open-source/#
Qt 5.4.0 for Windows 32-bit (VS 2013, OpenGL, 694 MB)
(qt-opensource-windows-x86-msvc2013_opengl-5.4.0.exe)
Qt 5.4.0 for Windows 64-bit (VS 2013, OpenGL, 709 MB)
(qt-opensource-windows-x86-msvc2013_64_opengl-5.4.0.exe)
CMake
You want to specify the destination of the input destination and solution files of source code.Where is the source code: C:\VTK-6.1.0
Where is build the binaries: C:\VTK-6.1.0\build
Press the [Configure] to select the Visual Studio that is the target.
It makes various settings.
(Grouped and helpful to put a check to Advanced.) * Win32 is Msvc2013_opengl , x64 is msvc2013_64_openglspecified in. Ungrouped Entries
Qt5Core_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Core
Qt5Designer_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Designer
Qt5Gui_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Gui
Qt5Network_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Network
Qt5OpenGL_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5OpenGL
Qt5Sql_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Sql
Qt5WebKit_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5WebKit
Qt5WebKitWidgets_DIRC:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5WebKitWidgets
Qt5Widgets_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Widgets
Qt5Xml_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake/Qt5Xml
BUILD
BUILD_SHAREED_LIBS
(check)
BUILD_TESTING ☐ (uncheck)
CMAKE
CMAKE_CONFIGURATION_TYPES Debug;Release
CMAKE_INSTALL_PREFIX C:\Program Files\VTK (or C:\Program Files (x86)\VTK)
Module
Module_vtkGUISupportQt
(check)
Module_vtkGUISupportQtOpenGL
(check)
Module_vtkGUISupportQtSQL
(check)
Module_vtkGUISupportQtWebkit
(check)
Module_vtkRenderingQt
(check)
Module_vtkViewsQt
(check)
OPENGL
OPENGL_gl_LIBRARY opengl
OPENGL_glu_LIBRARY glu32
QT
QT_MKSPECS_DIR C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/mkspecs/win32-msvc2013
QT_QMAKE_EXECUTABLE C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/bin/qmake.exe
QT_QTCORE_LIBRARY_DEBUG C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/Qt5Cored.lib
QT_QTCORE_LIBRARY_DEBUG C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/Qt5Core.lib
VTK
VTK_Group_Qt
(check)
VTK_INSTALL_QT_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_QT_DIR}
VTK_QT_VERSION 5
Press the [Add Entry] to add the following settings.
Name: | CMAKE_PREFIX_PATH |
Type: | PATH |
Value: | C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64 (or C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86) |
Description: |
Name: | CMAKE_DEBUG_POSTFIX |
Type: | STRING |
Value: | -gd |
Description: |
And output the solution file by pressing the [Generate].
Build
Start Visual Studio with administrative privileges VTK solution file (C: \ VTK-6.1.0 \ build \ VTK.sln) to open.(If you do not start with administrator privileges Visual Studio INSTALL to fail.)
It wants to build the VTK. (ALL_BUILD)
The configuration of the solution (Debug, Release) set the.
Choose the ALL_BUILD project from Solution Explorer.
[Build]> to build VTK Press [Build Solution].
It wants to install the VTK. (INSTALL)
Choose the INSTALL project from Solution Explorer.
build\GUISupport\Qt\PluginInstall.cmake
5 line
IF(BUILD_TYPE MATCHES Debug) SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin-gd.dll") ELSE() SET(VTK_INSTALL_QT_PLUGIN_FILE "QVTKWidgetPlugin.dll") ENDIF()
[Build]> [projects only]> to install the VTK Press [INSTALL only the Build menu.CMAKE_INSTALL_PREFIX necessary files are copied to the specified output destination.
https://hemprasad.wordpress.com/2015/04/30/building-vtk-with-visual-studio-2013/
https://gist.github.com/UnaNancyOwen/77d61f9f21376c9b59fc
相关文章推荐
- Qt从零开始制作串口调试助手-(第十章、串口接收数据处理)-Creator_Ly
- QT中文乱码
- Qt5.5制作简单的屏幕截图程序
- Qt中快捷键使用
- Qt环境下利用OpenGL显示三维模型
- Qt Creator 调试器未设置的解决办法(转
- Qt 容器类学习
- QtCreator下复制文件夹的一个BUG
- QtCreator下资源路径设置
- Qwt 折线图 波形图 柱状图示例效果
- QT QPushButton点击事件的实现
- Ⅰ.2.6.8 如何测试QTable (Qt 3)
- QTextEidt添加图片
- QTextEidt添加图片 拖动图片
- QTextEdit中添加图片
- Ⅰ.2.6.7 如何测试QListView (Qt 3)
- Qt之窗体透明
- 使用Qt正则表达式提取全路径的文件名
- QT: :QWheelEvent
- QT 应用程序关闭某个窗口时,关闭打开的所有其他窗口并退出程序