level 12
需要注意的地方:(引用)
VTK
VTK 5.4.2 contains a buggy freetype library, so you have to compile it yourself first.
Get freetype 2.3.11 or newer (only tested with 2.3.11) and unpack it in a temporary directory, for example c:\tmp
Open a MSYS shell, and type:
cd /c/tmp/freetype-2.3.11./configuremake -j4make install
This installs the FreeType2 libraries and headers into your MSYS environment.
Next, get VTK 5.4.2 and configure it with CMake:
Select the "MSYS Makefiles" generator
Check BUILD_SHARED_LIBS
Set CMAKE_BUILD_TYPE to "Release" (or "Debug", if you want to debug VTK)
Uncheck either CMAKE_USE_PTHREADS or CMAKE_USE_WIN32_THREADS (tested only with CMAKE_USE_WIN32_THREADS set to "ON")
Check VTK_USE_PARALLEL and VTK_USE_GUISUPPORT
Check VTK_USE_SYSTEM_FREETYPE
Uncheck VTK_USE_VIDEO4WINDOWS (MinGW does not provide headers for it)
(optional) Uncheck VTK_USE_GEOVIS, VTK_USE_INFOVIS, and VTK_USE_VIEWS (not needed for MITK)
Set CMAKE_INSTALL_PREFIX to "C:/msys/1.0/local"
Change other options as you see fit
Run configure, set the DESIRED_QT_VERSION variable to "4" and configure freeetype:
FREETYPE_INCLUDE_DIR_freetype2 = "C:/msys/1.0/local/include/freetype2"
FREETYPE_INCLUDE_DIR_ft2build = "C:/msys/1.0/local/include"
FREETYPE_LIBRARY = "C:/msys/1.0/local/bin/freetype-6.dll"
Run configure until there are no new variables and generate MSYS makefiles. You can now open a MSYS shell and cd into your VTK binary directory. Due to another "bug" in the VTK CMake scripts, you also need to hint gcc at the include directories for freetype:
cd /c/toolkits/vtk5.4.2/export CPLUS_INCLUDE_PATH=/usr/local/include:/usr/local/include/freetype2make -j4make install
2013年08月10日 09点08分
6