Commit da1aaab8 authored by Sylvain Thery's avatar Sylvain Thery

update readme

parent 71d18d7b
Linux dependencies
==================
install the following packages:
cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev zlib1g-dev libqt4-dev qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev libqglviewer-dev
Mac Dependencies
=================
To compile CGoGN on MAC
* install XCode and command line tools.
* install Qt4 (4.8) and QtCreator
* install (or build) libQGLViewer
* install cmake (native or with homebrew)
* install with homebrew : lzlib, glew, suite-sparse
To install suite-sparse package, you must first
add the homebrew/science repository with the following command :
brew tap homebrew/science
Compilation is the same as on Linux for CGoGN
To compile CGoGN
================
* first compile third-party libraries:
```
cd CGoGN/ThirdParty/build
cmake ..
make (-j x if you have x cores)
make install
```
In debug mode:
```
cd ../buildDebug
cmake ..
make (-j x if you have x cores)
make install
```
Some options are available to not compile everything:
* WITH_ASSIMP -> compile and use Assimp library
* WITH_ZINRI -> compile and use Zinri library
* WITH_PYTHONQT -> needed by SCHNApps
* then compile CGoGN (the libs are generated in CGoGN/lib and some examples in CGoGN/bin):
```
cd CGoGN/build
cmake ..
make (-j x if you have x cores)
```
in debug mode:
```
cd ../buildDebug
cmake ..
make
```
Some options are available:
* BUILD_SHARED_LIBS (F) experimental !
* ONELIB -> allow compilation in one lib (libcgogn.a) instead of four.
* WITH_ASSIMP -> use Assimp library (auto setted by third party compiling)
* WITH_ZINRI -> use Zinri library (auto setted by third party compiling)
* WITH_QT -> to minimize dependencies and compilation time
* WITH_GLEWMX -> to use GLEWMX (for VRJuggler users)
* we can then compile SCHNApps and the provided plugins :
```
cd CGoGN/SCHNApps/build
cmake ..
make (-j x if you have x cores)
```
in debug mode:
```
cd ../buildDebug
cmake ..
make
```
Libraries are generated in lib/Release and lib/Debug
Binaries are generated in bin/Release and bin/Debug
Examples of data (trianbgz, off, etc.. files) are available at the following address:
https://iggservis.u-strasbg.fr/Data/data.zip
See the [CGoGN Web site](cgogn.unistra.fr) for more informations.
We provide:
* CGoGN the core library
* tutorials and examples
* SCHNApps an integrated interface with plugin system.
CGoGN and SCHNApps are compatible with Linux, Mac and Windows
The usage of C++11 enforce the usage of recent compilers (g++4.8, clang3.0, cl18)
Linux
=====
Dependencies
------------
* install for following package cmake cmake-curses-gui cmake-qt-gui libXi-dev libXmu-dev libglew-dev zlib1g-dev uuid-dev libgsl0-dev libsuitesparse-dev python27
* for Qt4: libqt4-dev qt4-dev-tools qtcreator
* for Qt5: qt5-default qtbase5-dev-tools qtcreator
**Supported compilers: g++ 4.8 or greater**
Compiling
---------
* Launch cmake in a build directory with path to the CGoGN root directory as source parameter
* If directory name finish by 'Debug' compilation is done in Debug mode, else in Release mode
* Go in build directory and make (-j4 in your machine is 4 core)
CMake options (using gui or ccmake)
-----------------------------------
* CGoGN_WITH_ASSIMP: build CGoGN with Assimp (or not)
* CGoGN_WITH_ZINRI: build CGoGN with Zinri lib (or not)
* CGoGN_WITH_QT: build CGoGN with Qt (or not)
* CGoGN_DESIRED_QT_VERSION: Choose 4 or 5"
* CGoGN_WITH_GLEWMX: use (or not) multi-contex GLEW (for VRJuggler).
* CGoGN_USE_OGL_CORE_PROFILE: use (or not) OpenGL 3.3 core profile.
* CGoGN_COMPILE_EXAMPLES: compile the examples.
* CGoGN_COMPILE_TUTOS: compile the tutorials.
* CGoGN_COMPILE_TESTS: compile the tests.
* CGoGN_COMPILE_BENCHES: compile the benches.
* CGoGN_COMPILE_SANDBOX: compile all in sandbox
* CGoGN_ONELIB: build CGoGN in one lib instead of 4 separated libs
By default libraries are generated in dynamic version.
You can ideally do the same with QtCreator
Same compilation system for SCHNApps.
MacOS
=====
Dependencies
------------
* XCode and command line tools.
* Qt4 or Qt5 and QtCreator (native or with homebrew)
* cmake (native or with homebrew)
* install with homebrew : lzlib, glew, suite-sparse (you must first add the homebrew/science repository with the following command : brew tap homebrew/science)
* for macport user installation of suite sparse must be done with "+metis" (sudo port install SuiteSparse +metis)
**Supported compilers: clang 3.0 or greater**
Compiling
---------
As on linux
CMake Qt detection problem
--------------------------
If Qt is not found, add path to Qt to CMAKE_PREFIX_PATH variable.
Executables generation
----------------------
For best system compatibility executables are generated in bin/Release/Contents/MacOS
Window
======
Dependencies
------------
* install (or compile) Qt (choose 32/64 bits)
* install python 2.7 (choose 32/64 bits) (Needed for SCHNApps)
* Other Windows dependencies are furnished at http://cgogn.unistra.fr/Dependencies/
**Supported compilers: Visual C++ 2013 (12.0) or greater**
Environment variables
---------------------
* set PYTHON_PATH to your python installation directory
* set PYTHON_LIB to your python installation directory + \lib
* add xxx\windows_dependencies\lib to PATH
* add path to bin of Qt to PATH
Compiling
---------
* Use CMake with a build directory and path to the CGoGN root directory as source parameter
* for CMake options see Linux compiling
* generated visual solution (choose right compiler type)
* launch Visual Studio !
* build solution after choosing Debug/Release
CMake Qt detection problem
--------------------------
If Qt is not found set the QT_QMAKE_EXECUTABLE cmake variable.
DLL/Executables generation
--------------------------
To avoid dll loading problem, all dll and executable (even SCHNApps) are generated in bin/Release
or bin/Debug of CGoGN root directory.
Same compilation system for SCHNApps.
Compiling simple application
============================
To compile a Qt application using Qt, you just need to include *apps_cmake.txt* after setting
the CGoGN_ROOT_DIR variable. See example provided in *apps_cmake.txt* comments.
Principe des applications dans CGoGN_Apps (english version below)
Faire un repertoire CGoGN_Apps ou on veut. Y mettre des sous répertoires
contenant chacun une application/
Le CMakeLists.txt a la racine de l'application doit commencer par
cmake_minimum_required(VERSION 2.8)
project(APPLICATION_NAME)
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir")
include(${CGoGN_ROOT_DIR}/apps_cmake.txt)
include_directories(
${CGoGN_ROOT_DIR}/include
${COMMON_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
Faire un repertoire build et buildDebug
Pour compiler en release
cd build
cmake ..
make
Pour compiler en debug:
cd buildDebug
cmake ..
make
=========================================================================================
ENGLISH VERSION
=========================================================================================
Create a directory CGoGN_Apps where you want. Inside create subdirectories, one for each application.
The CMakeLists.txt to the root of the application must begin with
cmake_minimum_required(VERSION 2.8)
project(APPLICATION_NAME)
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir")
include(${CGoGN_ROOT_DIR}/apps_cmake.txt)
include_directories(
${CGoGN_ROOT_DIR}/include
${COMMON_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
The .. / .. / CGoGN corresponds to the relative path to your version of CGoGN
(here placed at the same level as CGoGN_Apps)
Create directories build and buildDebug
To compile in release mode:
cd build
cmake ..
make
To compile in debug mode:
cd buildDebug
cmake ..
make
*** english version below ***
Pour compiler CGoGN sur MAC (testé sur OS X 10.8.3)
Installer avec homebrew
cmake, lzlib, glew, boost149, suite-sparse, qt
Pour pouvoir installer le paquet suite-sparse, il faut avoir
prélablement ajouté le dépôt homebrew/science grâce à la commande suivante :
brew tap homebrew/science
=========================================================================================
ENGLISH VERSION
=========================================================================================
To compile CGoGN on MAC (tested on OSX 10.8.3)
Install with homebrew
cmake, lzlib, glew, boost149, suite-sparse, qt
To install suite-sparse package, you must first
add the homebrew/science repository with the following command :
brew tap homebrew/science
 *** english version below ***
Compilation sous VisualExpress C++
Prérequis:
Visual Studio ou C++ Express 2013 (C++11
CMake (au moins 2.8)
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Installer boost et Qt (4.8.x pas de 5.0 pour le moment)
Attention installer les binaires de Qt dans une version de compilateur differente (VS2008/VS2010)
permet d'executer mais pas de debugger !
Le plus sur mais plus long est de compiler soi-même Qt et Boost (bon courage)
Pour les "ThirdParty libs":
Lancer CMake (gui)
Mettre le chemin de la racine de CGoGN + /ThirdParty pour les sources
Mettre le chemin de la racine de CGoGN + /ThirdParty/build
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Modifier les variables en fonctions de ce que vous voulez compiler (README.TXT de ThirdParty)
Modifier le CMAKE_PREFIX_PATH si nécessaire (cf remarque dépendances)
Recliquer sur Configure
Cliquer sur Generate
Aller sous visual, charger et compiler en Release et Debug
Ne pas oublier de générer la cible INSTALL (une seule fois)
Pour CGoGN:
Relancer CMake
Mettre le chemin de la racine de CGoGN pour les sources
Mettre le chemin de la racine de CGoGN + /build pour le build
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Modifier les variables comme pour ThirdParty (et CMAKE_PREFIX_PATH si nécessaire)
Recliquer sur Configure
Cliquer sur Generate
Si il ne trouve pas Qt lui remplir la variable QT_QMAKE_EXECUTABLE
Si il ne trouve pas boost, remplir la variable Boost_INCLUDE_DIR (C:\Boost1.55\include par exemple)
Aller dans Visual et double-cliquer sur CGoGN.sln !!
ATTENTION: Problème de link avec QGLViewer en Debug.
Si vous compiler un exemple (tuto1 & viewer) en Debug, il faut modifier
le projet: Proprietés de configuration -> Editeur de liens -> entrée -> Dépendances supplémentaires
et changer le QGLViewer2.lib en QGLViewerd2.lib
Pour que les executables fonctionnent ajouter le chemin vers les dll des dépendances dans la variable
d'environnement path (ou copier les dll dans un répertoire déjà dans le path)
Remarque dépendances:
Si vous voulez utiliser vos propre versions des dépendance (Zlib / glew / Boost / Qt)
changer le CMAKE_PREFIX_PATH (voir ci dessous)
Attention pour Boost le prefix path ne marche pas (utiliser BOOST_ROOT et d'autres si nécessaire)
Compilation 64bits: TODO
=========================================================================================
ENGLISH VERSION
=========================================================================================
Prerequisites:
Visual Studio and C ++ Express (2010)
CMake (at least 2.8)
Unzip the windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) is the root of CGoGN
Install boost and Qt
Warning installing the binaries of Qt in a version of different compilers (VS2008/VS2010)
allows you to run but not in debug mode!
The safest but longest is to compile Qt yourself and Boost (good luck)
For the "ThirdParty libs"
Run CMake (gui)
Put the path to the root of CGoGN + / ThirdParty sources for sources
Put the path to the root of CGoGN + / ThirdParty / build for build
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables in functions that you want to compile (README.TXT for ThirdParty)
Edit CMAKE_PREFIX_PATH if necessary (see note dependencies)
Click again on Configure
Click on Generate
Go on visual, load and compile the solution in Release and Debug
Do not forgot to generate the target INSTALL (once)
For CGoGN:
Restart CMake
Put the path to the root of CGoGN for sources
Put the path to the root of CGoGN + / build to build
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables as ThirdParty (and CMAKE_PREFIX_PATH if necessary)
Click again on Configure
Click on Generate
Go to Visual and double-click on CGoGN.sln!
If it does not found Qt fill the QT_QMAKE_EXECUTABLE variable.
If it does not found boost, fill the Boost_INCLUDE_DIR variable (C:\Boost1.55\include for example)
WARNING: Problem of linking with QGLViewer in Debug
If you compile an example (tuto1 & viewer) in Debug you have to modifiy
the project: Configuration properties -> Linking Editor -> Entries -> Supplementary dependencies
and change QGLViewer2.lib in QGLViewerd2.lib
For running executables you have to add the path to the dll dependencies in the variable
path environment (or copy the dll in a directory already in the path)
Note Dependencies:
If you want to use your own versions of dependency (Zlib / glew / Boost / Qt)
CMAKE_PREFIX_PATH change (see below)
Attention to Boost the prefix path does not work (use BOOST_ROOT and others if necessary)
Compiling 64-bit: TODO
# How make separated applications
####################################################################################################
# How make a separated application
#
# usage: insert this line in your CMakeLists.txt
# usage:
# - create a directory
# - place your sources and CMakeLists.txt inside
# - insert this line in your CMakeLists.txt
# include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt)
# just after defining CGoGN_ROOT_DIR
#
......@@ -9,8 +13,6 @@
# cmake_minimum_required(VERSION 2.8)
# project(Pipo)
#
# LoadQtPackage()
#
# set(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir")
# include(${CGoGN_ROOT_DIR}/apps_cmake.txt)
#
......@@ -24,6 +26,7 @@
# WARNING: to avoid problem of DLL loading, on windows executable are generated in CGoGN/bin/....
# Take care while choosing executable names
#
####################################################################################################
SET ( CGoGN_SRC_DIR ${CGoGN_ROOT_DIR}/CGoGN)
SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
......@@ -68,7 +71,6 @@ IF (WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}) # Release/Debug added automatically by visual
ELSE()
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName})
message(STATUS ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual
ENDIF()
ELSE()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment