added some basic READMEs

This commit is contained in:
Mathis Logemann 2021-03-17 22:37:46 +01:00
parent ae43a49b71
commit 4e898b2a52
2 changed files with 41 additions and 0 deletions

View file

@ -2,6 +2,13 @@
Mapnik runs on Linux, OS X, Windows, and BSD systems. Mapnik runs on Linux, OS X, Windows, and BSD systems.
## Package managers
### vcpkg
To install mapnik with vcpkg type `vcpkg install mapnik`. It will install a minimal version of mapnik and all the needed dependencies.
To install more features, type `vcpkg search mapnik` to see all available features.
## Source build
First clone mapnik from github and initialize submodules First clone mapnik from github and initialize submodules
```bash ```bash

34
docs/cmake-usage.md Normal file
View file

@ -0,0 +1,34 @@
# Usage with CMake
## Build
First clone mapnik from github and initialize submodules
```bash
git clone https://github.com/mapnik/mapnik.git
cd mapnik
git submodule update --init
```
Make sure that all dependencies are installed.
All available cmake options are listed at the top of [CMakeLists.txt](../CMakeLists.txt).
Pass your options while configuring e.g.: `cmake -DBUILD_DEMO_VIEWER=OFF ..` to disable the build of the demo viewer application.
To quickstart open a console in the root mapnik dir and execute the following commands: (Pass all options and dependency dirs after `-DBUILD_TEST=OFF`)
```
> cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF
> cmake --build build --target install
```
## Usage
To use Mapnik in your project add the following lines to your CMakeLists.tzt.
```
find_package(mapnik CONFIG REQUIRED)
[...]
target_link_libraries(mytarget ... mapnik::headers mapnik::mapnik)
```
All mapnik executables and targets are exported within `MapnikTargets.cmake`.
The plugin dir is available in the variable `MAPNIK_PLUGINS_DIR`.
The font path is is available in the variable `MAPNIK_FONTS_DIR`.