doc: expand build instructions

This commit is contained in:
Roland Conybeare 2023-09-19 15:22:20 -04:00
commit 414630a09a
2 changed files with 27 additions and 2 deletions

View file

@ -7,11 +7,15 @@ enable_testing()
# always write compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
if(NOT USER)
set(USER $ENV{USER})
endif()
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX /home/roland/local CACHE STRING "install directory")
set(CMAKE_INSTALL_PREFIX /home/${USER}/local CACHE STRING "install directory")
endif()
if(NOT CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH /home/roland/local/lib CACHE STRING "runpath in installed libraries/executables")
set(CMAKE_INSTALL_RPATH /home/${USER}/local/lib CACHE STRING "runpath in installed libraries/executables")
endif()
include(cmake/nestlog.cmake)

View file

@ -16,6 +16,27 @@ Indentlog is a lightweight header-only library for console logging.
- logger is 'truthy' -> only pay for formatting when entry points is enabled.
- also provides family of convenience stream-inserters
## Getting Started
### copy repository locally
```
$ git clone git@github.com:rconybea/indentlog.git
$ ls -d indentlog
indentlog
```
### build & install
```
$ cd indentlog
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
$ make
$ make install
```
## Examples
### 1