Add CMake project and package

This commit is contained in:
Dennis Klein
2018-04-11 01:41:06 +02:00
parent 42470d2090
commit d7ddac01f7
8 changed files with 1181 additions and 25 deletions

41
README.md Normal file
View File

@@ -0,0 +1,41 @@
# FairLogger
Lightweight C++ Logging Library
## Installation
```bash
git clone https://github.com/FairRootGroup/FairLogger
mkdir FairLogger_build && cd FairLogger_build
cmake -DCMAKE_INSTALL_PREFIX=./FairLogger_install ../FairLogger
cmake --build . --target install
```
## Usage
In your `CMakeLists.txt`:
```cmake
find_package(FairLogger)
```
If FairLogger is not installed in system directories, you can hint the installation location:
```cmake
set(CMAKE_PREFIX_PATH /path/to/FairLogger/installation ${CMAKE_PREFIX_PATH})
find_package(FairLogger)
```
`find_package(FairLogger)` will define an imported target `FairLogger::FairLogger`.
## CMake options
On command line:
* `-DDISABLE_COLOR=ON` disables coloured console output.
## License
GNU Lesser General Public Licence (LGPL) version 3, see [LICENSE](LICENSE).
Copyright (C) 2017-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH