Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. DLT Logging with QT: "DLT" package not found
Forum Updated to NodeBB v4.3 + New Features

DLT Logging with QT: "DLT" package not found

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 344 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super_QT_Enthusiast
    wrote on last edited by
    #1

    Hello,

    in my project I currently try to integrate DLT logging with a specific dlt-contextId for my application.
    So therefore I used

    Q_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

    C 1 Reply Last reply
    0
    • S Super_QT_Enthusiast

      Hello,

      in my project I currently try to integrate DLT logging with a specific dlt-contextId for my application.
      So therefore I used

      Q_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

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved