Fix CMake pkg-config example

Fixes #877
parent 9dc080b9
...@@ -147,14 +147,14 @@ dependencies: dependency('pistache', fallback ['pistache', 'pistache_static_dep' ...@@ -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: 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
cmake_minimum_required(3.4 FATAL_ERROR) cmake_minimum_required(VERSION 3.6)
project("MyPistacheProject") project("MyPistacheProject")
# Find the library. find_package(PkgConfig)
find_package(Pistache 0.0.2 REQUIRED) pkg_check_modules(Pistache REQUIRED IMPORTED_TARGET pistache)
add_executable(${PROJECT_NAME} main.cpp) add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} pistache_shared) target_link_libraries(${PROJECT_NAME} PkgConfig::Pistache)
``` ```
### Makefile ### 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