INSTALL 2.75 KB
Newer Older
jclamber's avatar
jclamber committed
1 2 3

                                    UNSIO installation

jclamber's avatar
jclamber committed
4 5 6 7 8
0) Website
===========

UNSIO has 

jclamber's avatar
jclamber committed
9
- a dedicated website : http://projets.lam.fr/projects/unsio
jclamber's avatar
jclamber committed
10

jclamber's avatar
jclamber committed
11
- a wiki              : http://projets.lam.fr/projects/unsio/wiki
jclamber's avatar
jclamber committed
12

jclamber's avatar
jclamber committed
13 14 15 16

I) REQUIREMENTS
===============

17
Unsio compile fine on Linux and MacOSX. You just need a recent
jclamber's avatar
jclamber committed
18 19 20 21 22 23
gcc/g++ compiler and cmake tools (version 2.6). Cmake tools can be
installed directly from your distribution or downloaded from here :
http://www.cmake.org/cmake/resources/software.html

II) CONFIGURATION
=================
jclamber's avatar
jclamber committed
24 25 26

To configure UNSIO, type

jclamber's avatar
jclamber committed
27 28 29
mkdir build
cd build
cmake ..
jclamber's avatar
jclamber committed
30

jclamber's avatar
jclamber committed
31
 You can add several options to command "cmake". The most important ones are
jclamber's avatar
jclamber committed
32

jclamber's avatar
jclamber committed
33
  -DCMAKE_INSTALL_PREFIX=<dir>          installation directory [${NEMO}]
jclamber's avatar
jclamber committed
34 35
  -DCMAKE_BUILD_TYPE=<Debug|Release>    build type [Debug]
  -DBUILD_SHARED_LIBS=<TRUE|FALSE>      shared or static libraries [TRUE]
jclamber's avatar
jclamber committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

Here is different scenarios :

1) default configuration (no options added)
-------------------------------------------
mkdir build-debug
cd build-debug
cmake ..

Will configure unsio in "debug" mode, with shared library and
installation path will be
  a) in ${NEMO} if NEMO package is installed and loaded
  b) if not NEMO installed nor loaded, it will install to ${HOME}/local/unsio

2) you specify your own installation path
------------------------------------------
mkdir build-test
jclamber's avatar
jclamber committed
53
cd build_test
jclamber's avatar
jclamber committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
cmake .. -DCMAKE_INSTALL_PREFIX="/mypath/toinstall"

Will configure unsio in "debug" mode, with shared library and
installation path to "/mypath/toinstall"

3) you want compile in release mode (with optimizations enabled)
----------------------------------------------------------------
mkdir build-release
cd build-release  
cmake .. -DCMAKE_BUILD_TYPE=Release 

Will configure unsio in "release" mode with shared library and
installation path will be
  a) in ${NEMO} if NEMO package is installed and loaded
  b) if not NEMO installed nor loaded, it will install to ${HOME}/local/unsio

4) so forth and so on.....
jclamber's avatar
jclamber committed
71 72 73 74 75 76 77


Note that CMake maintains a cache name "CMakeCache.txt". If you change options
(or your environment changes), it is best to remove that file to avoid
problems.


jclamber's avatar
jclamber committed
78 79
III) BUILDING
==============
jclamber's avatar
jclamber committed
80

jclamber's avatar
jclamber committed
81
To build UNSIO libraries, type
jclamber's avatar
jclamber committed
82

jclamber's avatar
jclamber committed
83
  make    
jclamber's avatar
jclamber committed
84

jclamber's avatar
jclamber committed
85
If you want, you can install UNSIO headers and libraries. To do so, type
jclamber's avatar
jclamber committed
86 87 88 89 90 91 92 93 94

  make install


A list of all available make targets can be obtained by

  make help


jclamber's avatar
jclamber committed
95 96 97 98 99 100 101 102 103 104
IV) Mac OSX
============

 Under Mac OSX platform, once installed unsio, you have to set environement DYLD_LIBRARY_PATH to UNSIO installed location path

export DYLD_LIBRARY_PATH=_UNSIOPATH_/lib

where _UNSIOPATH_ matches to UNSIO installed location path


105 106 107 108 109 110 111 112 113 114
VI) Packaging
=============

To build a package (RPM, deb, etc....) use the following command :

cd build
cmake .. -DCMAKE_INSTALL_PREFIX="/usr"
make package