Skip to content
Snippets Groups Projects
README.md 2.82 KiB
Newer Older
## Dependencies
Martin Beseda's avatar
Martin Beseda committed
- [Git](https://git-scm.com/)
- [cmake](https://cmake.org/) (version >= 3.0)
- [Boost](https://www.boost.org/)
- [exprtk](http://www.partow.net/programming/exprtk/)
Michal Kravcenko's avatar
Michal Kravcenko committed

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
#### Linux
- `make`
- C++ compiler
Michal Kravcenko's avatar
Michal Kravcenko committed
- [Visual Studio](https://visualstudio.microsoft.com/) (install together with `cl` (check C++ options during installation) and `SDK`!)
Martin Beseda's avatar
Martin Beseda committed
## Compilation
- Clone the repository to your PC
Martin Beseda's avatar
Martin Beseda committed
    git clone git@code.it4i.cz:moldyn/lib4neuro.git
Martin Beseda's avatar
Martin Beseda committed

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

Martin Beseda's avatar
Martin Beseda committed
    ```
    sudo apt-get install libboost-all-dev
    ```
- Set `EXPRTK_INCLUDE_DIR` environmental variable to the path of your `exprtk` folder
    
    ``` 
    export EXPRTK_INCLUDE_DIR="path to the exprtk folder"
    ```
    
Michal Kravcenko's avatar
Michal Kravcenko committed
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
    
- Go to the `lib4Neuro` folder

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

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

#### Windows
- Run the Visual Studio Command Prompt (Start Menu -> Visual Studio *** -> Developer Command Prompt)
Michal Kravcenko's avatar
Michal Kravcenko committed
  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

        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
- 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
Michal Kravcenko's avatar
Michal Kravcenko committed
- Go to the `lib4Neuro` folder
Michal Kravcenko's avatar
Michal Kravcenko committed
- 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

Martin Beseda's avatar
Martin Beseda committed

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