Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt6 Android how to add openssl if target is a library.
Forum Updated to NodeBB v4.3 + New Features

Qt6 Android how to add openssl if target is a library.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 256 Views 1 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.
  • M Offline
    M Offline
    matzrm
    wrote on last edited by
    #1

    I'm building an android native app with Android Studio and a Qt6 library (no gui). With cmake I have already added Qt6::Core Qt6::Network, but I have many problems to include android_openssl to have the https support.

    Following the docs is not enough because I'm getting always

    No functional TLS backend was found
    

    So I decided to create a simple cmake project with QtCreator and following the hints inside android_openssl repository and I get QSslSocket working. The hints are:

    • using qt_add_executable(...) with MANUAL_FINALIZATION flag
    • then include android_openssl/CMakeLists.txt updated for Qt6
    • at the end call qt_finalize_target(...)

    This was enough to make my simple test works.

    Get back to my initial project, I'm building a library for Android so I have translated the qt_add_executable(...) in qt_add_library(...) always with MANUAL_FINALIZATION flag on.
    But now, I just discover that qt_finalize_target is an empty macro is the target is a library, and my whole library is not builded. Oblivisiouly if I switch qt_add_library with cmake add_library the library is builded but without openssl.

    Anyone can help?

    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