If you are using vcpkg and are faced with the problem of including the P7 logger client library like me, perhaps the solution proposed here will suit you.
The cmake/libp7client.cmake configuration allows you include the P7 logger client from vcpkg into your project.
- x64-windows
You can use the template from this repository for configure(template instructions) or use the instructions in paragraph 2 to include the P7 logger client in your project.
- Configure
-
- You should have vcpkg + cmake installed and added its to env. (use the vcpkg doc);
- Clone this template repository;
- Execute next CLI command in cloned repository:
cmake -B build -G=<your generator> -DVCPKG_PATH="<your path to vcpkg>"
-
- You should have vcpkg + cmake installed and added its to env. (use the vcpkg doc);
- Take
libp7client.cmake
from this repository; - Include
libp7client.cmake
into your project example:include(cmake/libp7client.cmake)
. - Add library the "P7 logger client" into your target, via defenition "LIB_P7_CLIENT"
example:
target_link_libraries(<your target name> LIB_P7_CLIENT)
.
-
- After generating the project, you will need a P7 server.
- Build your project, launch the P7 server and your app. look the message on the server.