Static Qt build TLS Network plugins
-
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 ? -
Hi,
The target is your application.
Something like:
qt_import_plugins(myapp INCLUDE_BY_TYPE tls )
-
@SGaist
Please note thatqt_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?