From 8ab742c2b78e74e0725c592e88edb0d65d71f2a1 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Wed, 18 Mar 2020 17:53:57 +0100 Subject: [PATCH] docs --- docs/src/consuming.rst | 21 +++++++++++++++++++++ docs/src/installation.rst | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/docs/src/consuming.rst b/docs/src/consuming.rst index cce1521cb..cd0bae70b 100644 --- a/docs/src/consuming.rst +++ b/docs/src/consuming.rst @@ -62,6 +62,27 @@ you should be able to configure and build your project in this way. A minimal example is available at: https://github.com/slsdetectorgroup/minimal-cmake + +CMake: find_package and conda +---------------------------------- + +.. note:: + + conda can also be used for installing dependencies such as zmq, Qt4 etc. + +find_package(slsDetectorPackage) also works if you have installed slsDetectorPackage using conda. +The only difference is that you point CMake to $CONDA_PREFIX + + +.. code-block:: bash + + #assuming myenv contains slsdetlib + conda activate myenv + cmake ../path/to/your/source -DCMAKE_PREFIX_PATH=$CONDA_PREFIX + make + +Depending on your system compiler you might also have to install gxx_linux-64 to compiled. + No tools minimal approach ----------------------------- diff --git a/docs/src/installation.rst b/docs/src/installation.rst index 1c22971ae..57f624dc7 100644 --- a/docs/src/installation.rst +++ b/docs/src/installation.rst @@ -21,5 +21,37 @@ Build from source using CMake make -j12 make install - +Install binaries using conda +-------------------------------- +.. code-block:: bash + + #Add channels for dependencies and our library + conda config --add channels conda-forge + conda config --add channels slsdetectorgroup + conda config --set channel_priority strict + + #cerate an environment with our library, then activate + conda create -n myenv slsdetlib=2020.03.18.dev2 + codna activate myenv + + #ready to use + sls_detector_get exptime + etc ... + + + +Build from source on old distributions +----------------------------------------- + +If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then +it's possible to install a newer gcc using conda and build the slsDetectorPackage +using this compiler + +.. code-block:: bash + + #Create an environment with the dependencies + conda create -n myenv gxx_linux-64 cmake zmq + conda activate myenv + cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX + make -j12 \ No newline at end of file