doc:devel:vtk
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:devel:vtk [2012/11/29 13:29] – [Debug] marlene | doc:devel:vtk [2018/05/04 17:15] (current) – removed boman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Compiler VTK pour Metafor ====== | ||
- | |||
- | memo comment je (luc) compile vtk pour les Libs | ||
- | |||
- | ===== Windows (compatible python_d pour vtk 5.10) - v. Marlène ===== | ||
- | |||
- | vtk : basé sur vtk-5.10.1 (les libs de luc sont dans " | ||
- | |||
- | deux projets différents: | ||
- | |||
- | ==== Release ==== | ||
- | |||
- | |||
- | * Détarer les sources : F: | ||
- | * Créer le répertoire de compilation : F: | ||
- | * Créer le répertoire d' | ||
- | * Modifier les sources VTK : link_directories | ||
- | < | ||
- | | ||
- | Ajouter : | ||
- | # Add link directories needed to use VTK. | ||
- | LINK_DIRECTORIES(${VTK_LIBRARY_DIRS}) | ||
- | après | ||
- | INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) | ||
- | </ | ||
- | |||
- | * Executer CMake : modifier les options suivante (cfr config de luc ci-dessous) : | ||
- | * BUILD_SHARED_LIBS : ON | ||
- | * CMAKE_INSTALL_PREFIX : '' | ||
- | * VTK_DEBUG_LEAKS : OFF (pour une version à distribuer, peut-être ON sinon) | ||
- | * VTK_USE_GL2PS : ON | ||
- | * VTK_USE_QT : ON | ||
- | * VTK_WRAP_PYTHON : ON | ||
- | * VTK_WRAP_TCL : ON | ||
- | * Les autres options doivent " | ||
- | * Compiler ALL_BUILD (Release) | ||
- | * Installer : via compilation du projet INSTALL (Release) | ||
- | * Modifier les chemins relatifs des librairies en variables d' | ||
- | * remplacer '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * Copier le répertoire '' | ||
- | * Installer les wrappers python (crée le répertoire F: | ||
- | dans '' | ||
- | | ||
- | Vérification: | ||
- | |||
- | ==== Debug ==== | ||
- | |||
- | * Détarer les sources (ou copier celle de '' | ||
- | * Créer le répertoire de compilation : F: | ||
- | * Créer le répertoire d' | ||
- | * Modifier les sources VTK : | ||
- | * link_directories: | ||
- | < | ||
- | | ||
- | Ajouter : | ||
- | # Add link directories needed to use VTK. | ||
- | LINK_DIRECTORIES(${VTK_LIBRARY_DIRS}) | ||
- | après | ||
- | INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) | ||
- | </ | ||
- | * DLL's VTK Debug : ajout du postfix " | ||
- | < | ||
- | | ||
- | Ajouter la propriété : | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} DEBUG_POSTFIX _d ) | ||
- | dans le tests : | ||
- | IF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | |||
- | soit : | ||
- | IF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} | ||
- | VERSION " | ||
- | SOVERSION " | ||
- | ) | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} | ||
- | DEBUG_POSTFIX _d | ||
- | ) | ||
- | ENDIF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | </ | ||
- | * Wrappers Python debug : postfix " | ||
- | < | ||
- | modifier " | ||
- | IF(WIN32 AND NOT CYGWIN) | ||
- | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES SUFFIX " | ||
- | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES DEBUG_POSTFIX " | ||
- | ENDIF(WIN32 AND NOT CYGWIN) | ||
- | </ | ||
- | * Executer CMake : modifier les options suivante (cfr config de luc ci-dessous) : | ||
- | * PYTHON_EXECUTABLE : aller chercher le path de python_d.exe | ||
- | * CMAKE_CONFIGURATION_TYPE : Debug | ||
- | * BUILD_SHARED_LIBS : ON | ||
- | * CMAKE_INSTALL_PREFIX : '' | ||
- | * VTK_DEBUG_LEAKS : OFF (pour une version à distribuer, peut-être ON sinon) | ||
- | * VTK_USE_GL2PS : ON | ||
- | * VTK_USE_QT : ON | ||
- | * VTK_WRAP_PYTHON : ON | ||
- | * VTK_WRAP_TCL : ON | ||
- | * Les autres options doivent " | ||
- | * Compiler ALL_BUILD (Debug) | ||
- | * Installer : via compilation du projet INSTALL (Debug) | ||
- | * Modifier les chemins relatifs des librairies en variables d' | ||
- | * Copier les fichiers '' | ||
- | * Copier les fichiers '' | ||
- | * Copier le fichier '' | ||
- | * Installer les wrappers python : copier '' | ||
- | |||
- | Vérification: | ||
- | |||
- | ==== Compiler Metafor ==== | ||
- | Pour compiler Metafor avec ces libs, changer le numero de version vtk dans le chemin de ZLIB dans la config cmake | ||
- | ===== Windows (v. Luc) ===== | ||
- | |||
- | * vtk : basé sur vtk-5.6.0 | ||
- | * Détarer les sources : E: | ||
- | * Créer le répertoire de compilation : E: | ||
- | * Modifier les sources VTK : | ||
- | * DLL's VTK Debug : ajout du postfix " | ||
- | < | ||
- | | ||
- | Ajouter la propriété : | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} DEBUG_POSTFIX _d ) | ||
- | dans le tests : | ||
- | IF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | |||
- | soit : | ||
- | IF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} | ||
- | VERSION " | ||
- | SOVERSION " | ||
- | ) | ||
- | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} | ||
- | DEBUG_POSTFIX _d | ||
- | ) | ||
- | ENDIF(NOT VTK_NO_LIBRARY_VERSION) | ||
- | </ | ||
- | |||
- | * Wrappers Python debug : postfix " | ||
- | < | ||
- | modifier " | ||
- | IF(WIN32 AND NOT CYGWIN) | ||
- | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES SUFFIX " | ||
- | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES DEBUG_POSTFIX " | ||
- | ENDIF(WIN32 AND NOT CYGWIN) | ||
- | </ | ||
- | * Utilisation de la lib python_d.dll en debug : | ||
- | < | ||
- | modifier " | ||
- | remplacer : | ||
- | #if defined(VTK_WINDOWS_PYTHON_DEBUGGABLE) | ||
- | # include < | ||
- | #else | ||
- | # ifdef _DEBUG | ||
- | # undef _DEBUG | ||
- | # if defined(_MSC_VER) && _MSC_VER >= 1400 | ||
- | # define _CRT_NOFORCE_MANIFEST 1 | ||
- | # endif | ||
- | # include < | ||
- | # define _DEBUG | ||
- | # else | ||
- | # include < | ||
- | # endif | ||
- | #endif | ||
- | par | ||
- | #include < | ||
- | </ | ||
- | |||
- | * Executer CMake : modifier les options suivante : | ||
- | * BUILD_SHARED_LIBS : ON | ||
- | * CMAKE_INSTALL_PREFIX : E: | ||
- | * VTK_DEBUG_LEAKS : ON | ||
- | * VTK_USE_GL2PS : ON | ||
- | * VTK_USE_QT : ON | ||
- | * VTK_WRAP_PYTHON : ON | ||
- | * VTK_WRAP_TCL : ON | ||
- | * Les autres options doivent " | ||
- | * Compiler (release et debug) | ||
- | * Installer : via compilation du projet Install (release et debug) | ||
- | * Modifier les chemins relatifs des librairies en variables d' | ||
- | * remplacer " | ||
- | * E: | ||
- | * E: | ||
- | * E: | ||
- | * Copier le répertoire " | ||
- | * Installer les wrappers python : copier " | ||
- | |||
- | ===== Linux - Old version to be updated ... ===== | ||
- | |||
- | * vtk : / | ||
- | * Détarer les sources (~/ | ||
- | * Créer un répertoire de compilation (~/ | ||
- | * Aller dans le répertoire de compilation (~/ | ||
- | * Lancer cmake interfacé : ccmake ../VTK | ||
- | * gérer les options : (celles à modifier. en " | ||
- | * BUILD_SHARED_LIBS : ON | ||
- | * CMAKE_INSTALL_PREFIX : / | ||
- | * VTK_WRAP_PYTHON : ON | ||
- | * VTK_WRAP_TCL : ON | ||
- | * VTK_USE_GL2PS : ON | ||
- | * VTK_USE_GUISUPPORT : ON | ||
- | * configure (et vérifier que les libs nécessaires sont présente) [c] | ||
- | * VTK_USE_QVTK : ON | ||
- | * configure (et vérifier que les libs nécessaires sont présente) [c] | ||
- | * DESIRED_QT_VERSION : 4 | ||
- | * VTK_USE_QVTK_QTOPENGL : ON | ||
- | * configure [c] | ||
- | * generate makefiles & exit [g] | ||
- | * compiler - installer | ||
- | * gmake -j 16 | ||
- | * sudo make install | ||
- | * installer le wrapper python | ||
- | * cd ~/ | ||
- | * sudo python setup.py install | ||
- | * Ajouter le répertoire vtk dans le ldconfig (chemin des .so dans le système) | ||
- | * sudo echo / | ||
- | * sudo ldconfig -v -f / | ||
doc/devel/vtk.1354192190.txt.gz · Last modified: 2016/03/30 15:22 (external edit)