vcpkg
vcpkg copied to clipboard
[easyloggingpp] how to use it? (missing usage)
Is your feature request related to a problem? Please describe.
When installing easyloggingpp
via manifest mode:
{
"name": "easyloggingpp",
"version>=": "9.97.1",
"features": [
"no-defaultfile",
"std-locking",
"thread-safe"
]
},
...it states:
easyloggingpp provides pkg-config modules:
# Feature-rich single header C++ logging library
easyloggingpp
I'm missing instructions on how to "find" the library in CMake
and how to link it.
Proposed solution
Add usage
to port.
https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
find_package(PkgConfig REQUIRED)
pkg_check_modules(easyloggingpp REQUIRED IMPORTED_TARGET easyloggingpp)
target_link_libraries(MyTarget PRIVATE PkgConfig::easyloggingpp)
Actually i was missing the #include <easylogging++.cc>
include to successfully compile, which is described here. Maybe we can state this in the usage
file then.
Additionally checking if easyloggingpp
is present with pkg_check_modules
is a good way to prevent issues.