Salome HOME
Increment version: 8.2.0
[plugins/canrecplugin.git] / INSTALL
1 *************************
2 Installation Instructions
3 *************************
4
5 Copyright (C) 2014-2016 OPEN CASCADE
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either 
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful 
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public  
18 License along with this library; if not, write to the Free Software 
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20
21 See http://www.salome-platform.org or email : webmaster.salome@opencascade.com
22
23 ==============
24 Pre-requisites
25 ==============
26
27 OCCT Canonical recognition (CANREC) plugin for SALOME Geometry module requires:
28
29 - SALOME, at least KERNEL and GEOM modules (http://www.salome-platform.org).
30 - Open CASCADE Technology and OCCT Canonical recognition (CR) product
31   (http://www.opencascade.org).
32 - Other pre-requisite products, according to the SALOME pre-requisites list.
33
34 ==================
35 Basic Installation
36 ==================
37
38 The build procedure of the CANREC plugin for SALOME Geometry module is
39 created using CMake build system.
40 In order to build the plugin you have to do the following actions: 
41
42 1. Set an environment to point to the OCCT Canonical recognition product,
43 for example:
44
45    - for csh:
46
47    % setenv CR_ROOT_DIR /path/to/the/CR-6.9.0
48    % setenv LD_LIBRARY_PATH ${CR_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
49
50    - for bash:
51    
52    % export CR_ROOT_DIR=/path/to/the/CR-6.9.0
53    % export LD_LIBRARY_PATH=${CR_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
54
55    Note, that OCCT CR product requires OCCT license library.
56    Normally OCCT license library is distributed with OCCT CR
57    product, but it can also be distributed separately. In latter
58    case you might need to set-up environment to point to the OCCT
59    license library, as follows:
60
61    - for csh:
62
63    % setenv OCCLICENSE_ROOT_DIR /path/to/the/OCCLicense-6.9.0
64    % setenv LD_LIBRARY_PATH ${OCCLICENSE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
65
66    - for bash:
67    
68    % export OCCLICENSE_ROOT_DIR=/path/to/the/OCCLicense-6.9.0
69    % export LD_LIBRARY_PATH=${OCCLICENSE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
70
71 2. Create a build directory (in the example below, it is assumed
72    that this directory is created at the same level as sources
73    directory CANRECPLUGIN_SRC), for example:
74
75    % mkdir CANRECPLUGIN_BUILD
76
77 3. Configure the build procedure:
78
79    % cd CANRECPLUGIN_BUILD
80    % cmake -DCMAKE_BUILD_TYPE=<mode> -DCMAKE_INSTALL_PREFIX=<installation_directory> ../CANRECPLUGIN_SRC
81
82    where
83    - <mode> is either Release or Debug;
84    - <installation_directory> is a destination folder to install CANREC plugin.
85
86    By default (if CMAKE_INSTALL_PREFIX option is not given), CANREC plugin will be
87    configured for installation to the /usr directory that requires root 
88    permissions to complete the installation.
89
90 4. Build and install CANREC plugin:
91
92    % make
93    % make install
94
95    This will install CANREC plugin to the <installation_directory> specified
96    with cmake command on previous step.
97
98 ===================
99 Custom installation
100 ===================
101
102 For setting unusual options for compilation or linking run the following
103 commands o get details on some of the pertinent environment variables:
104
105    % cd CANRECPLUGIN_BUILD
106    % ccmake ../CANRECPLUGIN_SRC 
107
108 You can also use other options of cmake command to customize
109 your installation. Learn more about available options by running
110
111    % cmake --help