diff --git a/README.md b/README.md index 21d5e25..7ebab60 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,57 @@ base toolkit library CMT Cosmic Muon Tomography reconstruction, analysis and imaging software Developed by University of Padova and INFN Sezione di Padova Italy +## Build Instructions + +This project relies on `conan` (v2) for dependency management (Eigen3, Boost) and `cmake` for configuration. VTK is provided through the micromamba/conda-forge environment. + +### Prerequisites + +This project requires a `conda` or `micromamba` environment containing the necessary global tools like **ROOT**, **VTK**, and **Conan** (v2). We provide a `condaenv.yml` file to quickly build this environment. + +#### Installing Micromamba (Optional) + +If you do not have `conda` installed, `micromamba` is a fast and lightweight alternative. You can install it on Linux via: + +```bash +"${SHELL}" <(curl -L micro.mamba.pm/install.sh) +``` + +#### Creating the Environment + +You can create and activate the environment using either `micromamba` or `conda`. + +**Using Micromamba:** +```bash +micromamba env create -f condaenv.yml +micromamba activate mutom +``` + +**Using Conda:** +```bash +conda env create -f condaenv.yml +conda activate mutom +``` + +### Configure and Build + +1. **Configure Conan profile (if you haven't yet on your machine):** +```bash +conan profile detect +``` + +2. **Install Conan dependencies:** +```bash +conan install . --output-folder=build --build=missing +``` + +3. **Configure the project with CMake:** +```bash +cmake --preset conan-release +``` +*(Alternatively: `cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release`)* + +4. **Build the project:** +```bash +cmake --build build -j10 +``` diff --git a/condaenv.yml b/condaenv.yml new file mode 100644 index 0000000..8ec18fe --- /dev/null +++ b/condaenv.yml @@ -0,0 +1,10 @@ +name: mutom +channels: + - conda-forge +dependencies: + - compiler-rt + - make + - cmake + - conan + - root + - vtk