README.md 2.82 KB
Newer Older
1
## Dependencies
Martin Beseda's avatar
Martin Beseda committed
2 3 4 5
- [Git](https://git-scm.com/)
- [cmake](https://cmake.org/) (version >= 3.0)
- [Boost](https://www.boost.org/)
- [exprtk](http://www.partow.net/programming/exprtk/)
6

Michal Kravcenko's avatar
Michal Kravcenko committed
7 8 9

To save you from some inconveniences we provide the dependencies [Boost](https://www.boost.org/), [exprtk](http://www.partow.net/programming/exprtk/) locally with our distribution. However, you are free to install those on your own and then provide our building tool with relevant paths to your own installations

Martin Beseda's avatar
Martin Beseda committed
10 11 12
#### Linux
- `make`
- C++ compiler
13 14

#### Windows
Michal Kravcenko's avatar
Michal Kravcenko committed
15
- [Visual Studio](https://visualstudio.microsoft.com/) (install together with `cl` (check C++ options during installation) and `SDK`!)
16

Martin Beseda's avatar
Martin Beseda committed
17 18
## Compilation
- Clone the repository to your PC
19 20

    ```
Martin Beseda's avatar
Martin Beseda committed
21
    git clone git@code.it4i.cz:moldyn/lib4neuro.git
22
    ```
Martin Beseda's avatar
Martin Beseda committed
23

Martin Beseda's avatar
Martin Beseda committed
24 25
#### Linux (Debian-based)
- Install package `libboost-all-dev`
Martin Beseda's avatar
Martin Beseda committed
26

Martin Beseda's avatar
Martin Beseda committed
27 28 29
    ```
    sudo apt-get install libboost-all-dev
    ```
30
    
31
- Set `EXPRTK_INCLUDE_DIR` environmental variable to the path of your `exprtk` folder
32 33 34 35 36
    
    ``` 
    export EXPRTK_INCLUDE_DIR="path to the exprtk folder"
    ```
    
Michal Kravcenko's avatar
Michal Kravcenko committed
37 38
or alternativelly download the sources of [Boost](https://www.boost.org/) and [exprtk](http://www.partow.net/programming/exprtk/) via the `download_dependencies.sh` script located in the `lib4Neuro/build_scripts/linux` folder. Those will then be used automatically during the compilation of `lib4neuro` library
    
39 40
- Go to the `lib4Neuro` folder

Michal Kravcenko's avatar
Michal Kravcenko committed
41
- In the file `build.sh`  set correctly variables `BUILD_TYPE`, `CXX_COMPILER` and `C_COMPILER`
42 43

- Run
Martin Beseda's avatar
Martin Beseda committed
44 45 46 47

    ```
    ./build.sh
    ```
Martin Beseda's avatar
Martin Beseda committed
48 49

#### Windows
50
- Run the Visual Studio Command Prompt (Start Menu -> Visual Studio *** -> Developer Command Prompt)
Michal Kravcenko's avatar
Michal Kravcenko committed
51 52
  and go to the `lib4Neuro` folder
- If you have [Boost](https://www.boost.org/) already installed, set `BOOST_ROOT` environmental variable to the path of your folder containing `Boost`
Martin Beseda's avatar
Martin Beseda committed
53

54 55 56 57 58
        1. In Search, search for and then select: System (Control Panel)
        2. Click the Advanced system settings link.
        3. Click Environment Variables.
        4. In the New System Variable window, specify the value of the `BOOST_ROOT` environment variable

Michal Kravcenko's avatar
Michal Kravcenko committed
59 60
- If you have [exprtk](http://www.partow.net/programming/exprtk/) already downloaded, set `EXPRTK_INCLUDE_DIR` environmental variable to the path of your `exprtk` folder
- Alternativelly, if you want to avoid the hassle with downloading the dependencies yourselves, run `build_scripts/windows/win_download_dependencies.bat` which downloads the [Boost](https://www.boost.org/) and [exprtk](http://www.partow.net/programming/exprtk/) dependencies and stores them in the `external_dependencies` folder
61

Michal Kravcenko's avatar
Michal Kravcenko committed
62
- Go to the `lib4Neuro` folder
63

Michal Kravcenko's avatar
Michal Kravcenko committed
64
- In the file `build.bat`  set correctly variables `BUILD_TYPE`, `CXX_COMPILER` and `C_COMPILER`, by default the build type is `Debug` and MSVC compiler is set
Martin Beseda's avatar
Martin Beseda committed
65

66
- Run
Martin Beseda's avatar
Martin Beseda committed
67 68 69 70

    ```
    build.bat
    ```
Martin Beseda's avatar
Martin Beseda committed
71