DLT Logging with QT: "DLT" package not found
-
Hello,
in my project I currently try to integrate DLT logging with a specific dlt-contextId for my application.
So therefore I usedQ_DECLARE_LOGGING_CATEGORY(MyLogCategory) and QDLT_LOGGING_CATEGORY(MyLogCategory, "MyLogCat.logs", "MYLO", "My Logs")
to define my log category. And
qWarning(MyLogCategory) << "some log blabla";
for the logging itself. All fine so far!
To support the logging I added DltLogging to my cmake CMakeLists.txt:
find_package(Qt6DltLogging REQUIRED) ... other stuff ... target_link_libraries( my_project PRIVATE ....other libs Qt6::Quick Qt6::DltLogging )
Now when running cmake the issues start occuring:
cmake trys to find package Qt6DltLogging which successfull. Internal Qt6DltLogging uses Qt6DltLoggingDependencies.cmake to find a package called "DLT" which is not found on my computer. This results in failing of cmake. Full error:CMake Warning at .../share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package): By not providing "FindDLT.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "DLT", but CMake did not find one. Could not find a package configuration file provided by "DLT" with any of the following names: DLTConfig.cmake dlt-config.cmake Add the installation prefix of "DLT" to CMAKE_PREFIX_PATH or set "DLT_DIR" to a directory containing one of the above files. If "DLT" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): ...lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:33 (find_dependency) .../lib/cmake/Qt6DltLogging/Qt6DltLoggingDependencies.cmake:30 (_qt_internal_find_third_party_dependencies) .../lib/cmake/Qt6DltLogging/Qt6DltLoggingConfig.cmake:40 (include) CMakeLists.txt:3 (find_package) CMake Error at CMakeLists.txt:3 (find_package): Found package configuration file: .../lib/cmake/Qt6DltLogging/Qt6DltLoggingConfig.cmake but it set Qt6DltLogging_FOUND to FALSE so package "Qt6DltLogging" is considered to be NOT FOUND. Reason given by package: Qt6DltLogging could not be found because dependency DLT could not be found. Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some of the path variables that find_package uses to try and find the package. -- Configuring incomplete, errors occurred!
When I search my whole system for DLTConfig.cmake or dlt-config.cmake it is not on the disc.
Any ideas what ideas how to resolve this issue?Thanks in advance & regards
-
@Super_QT_Enthusiast Looking in the source, I would expect you should have a
FindDLT.cmake
file in cmake's search path so that:find_package(DLT REQUIRED)
might get closer to the result.