Skip to content

Commit

Permalink
Merge pull request #22 from bernedom/documentation/extended-installat…
Browse files Browse the repository at this point in the history
…ion-docu

Documentation/extended installation docu
  • Loading branch information
bernedom authored Aug 28, 2019
2 parents 6662ede + 5b9d5d7 commit 012bf78
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 37 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changelog

## 1.3.0
## 1.2.1

* Added operators +=, *=, /=, -= (Thanks to [Kicer96](https://github.com/Kicer86) for the initial work)
* Added momentum (Thanks to [Kicer96](https://github.com/Kicer86))
* Added packaging options for conan.io
* Added packaging information for conan.io and deployment to bintray

## 1.2.0

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12)
project(
"SI"
VERSION
1.3.0
1.2.1
DESCRIPTION
"A header only c++ library that provides type safety and user defined literals for handling pyhsical values defined in the International System of Units."
HOMEPAGE_URL
Expand Down
34 changes: 2 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,39 +114,9 @@ substitute `--config Debug` with `--config Release` for optimized builds

### Installing

To install SI use the commands below: this will install SI into `/usr/local/lib/cmake/SI`
The default installation location for SI is `/usr/local/lib/SI`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [Bintray](https://bintray.com/bernedom/conan/SI%3ASI)

```bash
mkdir build && cd build
cmake ..
cmake --build . --config Release --target install -- -j $(nproc)
```

Consider running the build/install command with setting the install prefix, if you do not want to install SI system wide

```bash
-DCMAKE_INSTALL_PREFIX:PATH=${HOME}/SI-install
```

The folder `test/installation-tests` contains a standalone sample program to check for succesful installation.

#### Installing using `cpack`

To build the `cpack` package use:

```bash
mkdir build && cd build
cmake ..
cmake --build . --config Release --target package -- -j $(nproc)
```

This creates gzipped archives containing all files as well as an installation script `SI-<version>-<plattform>.sh`.

```bash
cd build
mkdir ${HOME}/SI-install
./SI-1.0.1-Linux.sh --prefix=$HOME/SI-install --skip-license --exclude-subdir
```
See [the installation guide](https://github.com/bernedom/SI/blob/master/doc/installation-guide.md) for detailed instructions

## Building the tests

Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class SiConan(ConanFile):
name = "SI"
version = "1.3.0"
version = "1.2.1"
license = "MIT"
author = "Dominik Berner <[email protected]"
url = "https://github.com/bernedom/SI"
Expand Down
58 changes: 58 additions & 0 deletions doc/installation-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Installing `SI`

The default installation location for SI is `/usr/local/lib/SI`. SI can be installed using raw cmake, cpack (cmakes package mechanism), or as a conan.io package provided from [Bintray](https://bintray.com/bernedom/conan/SI%3ASI)

## Installing using cmake

To install using cmake, clone the repository and execute the following commands from within the cloned folder.

```bash
mkdir build && cd build
cmake ..
cmake --build . --config Release --target install -- -j $(nproc)
```

Consider running the build/install command with setting the install prefix, if you do not want to install SI system wide

```bash
-DCMAKE_INSTALL_PREFIX:PATH=${HOME}/SI-install
```

The folder `test/installation-tests` contains standalone sample programs to check for succesful installation.

## Installing using `cpack`

To install using cpack, clone the repository and execute the following commands from within the cloned folder.

```bash
mkdir build && cd build
cmake ..
cmake --build . --config Release --target package -- -j $(nproc)
```

This creates gzipped archives containing all files as well as an installation script `SI-<version>-<plattform>.sh`.

```bash
cd build
mkdir ${HOME}/SI-install
./SI-1.0.1-Linux.sh --prefix=$HOME/SI-install --skip-license --exclude-subdir
```

## Installation using conan.io

As SI is not yet available on [conan-center](https://bintray.com/conan/conan-center) the current bintray repository has to be added to conan first to download SI.

```bash
conan remote add bernedom https://api.bintray.com/conan/bernedom/conan
```

In the `conanfile.txt` SI is added like this, to ensure to get the latest version.

```
[requires]
SI/[>1.0 <2.0]@SI/stable
```

use `SI/unstable` to get the latest development builds. See the [official conan documentation](https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_generator.html) on how to integrate the package into your cmake project.


1 change: 0 additions & 1 deletion test/installation-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ testConanCmakeIntegratedInstallation()

# cleanup
conan remove -f *@SI/testing

}


Expand Down

0 comments on commit 012bf78

Please sign in to comment.