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. Static Qt build TLS Network plugins
Forum Updated to NodeBB v4.3 + New Features

Static Qt build TLS Network plugins

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 379 Views 2 Watching
  • 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.
  • J Offline
    J Offline
    just_a_developer
    wrote on last edited by
    #1

    I am a commercial customer of Qt. I build the Qt static library myself.
    I see this when I compile Qt :
    Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library.

    I need to use the new Qt6Network OpenSSL TLS plugin.
    I am trying to follow this one :
    https://doc.qt.io/qt-6/plugins-howto.html#importing-static-plugins-in-cmake
    , and I tried many combinations, but I received CMake errors so far.

    What is the name of the CMake target that I should link and use in the qt_import_plugins call ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The target is your application.

      Something like:

      qt_import_plugins(myapp
          INCLUDE_BY_TYPE tls
      )
      

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J SGaistS 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        The target is your application.

        Something like:

        qt_import_plugins(myapp
            INCLUDE_BY_TYPE tls
        )
        
        J Offline
        J Offline
        just_a_developer
        wrote on last edited by just_a_developer
        #3

        @SGaist
        Please note that

        qt_import_plugins(myapp
            INCLUDE_BY_TYPE tls
        )
        

        didn't work, because it was giving this error :

        CMake Error at C:/.conan/793fef/1/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:852 (message):
          qt_import_plugins: invalid syntax for INCLUDE_BY_TYPE
        Call Stack (most recent call first):
          C:/.conan/793fef/1/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:882 (qt6_import_plugins)
          CMakeLists.txt:176 (qt_import_plugins)
        

        So I tried to slightly modify it :

        qt_import_plugins(${PROJECT_NAME} INCLUDE tls)
        

        , but I get the following warning when I run CMake :
        "Warning: plug-in tls is not known to the current Qt installation."

        Do you know how could this be fixed?

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          The target is your application.

          Something like:

          qt_import_plugins(myapp
              INCLUDE_BY_TYPE tls
          )
          
          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Sorry, I misunderstood the macro documentation.

          What about:

          qt_import_plugins(myapp
              INCLUDE_BY_TYPE tls Qt::QTlsBackendOpenSSLPlugin
          )
          

          ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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