Fix CMake pkg-config example

Fixes #877
parent 9dc080b9
......@@ -147,14 +147,14 @@ dependencies: dependency('pistache', fallback ['pistache', 'pistache_static_dep'
To use with a CMake build environment, use the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. Here is an example:
```cmake
cmake_minimum_required(3.4 FATAL_ERROR)
cmake_minimum_required(VERSION 3.6)
project("MyPistacheProject")
# Find the library.
find_package(Pistache 0.0.2 REQUIRED)
find_package(PkgConfig)
pkg_check_modules(Pistache REQUIRED IMPORTED_TARGET pistache)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} pistache_shared)
target_link_libraries(${PROJECT_NAME} PkgConfig::Pistache)
```
### Makefile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment