Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116667

QT_ANDROID_EXTRA_LIBS does not copy all extra libs

    XMLWordPrintable

Details

    • Android

    Description

      In the doc is stated this:

      A list of external libraries that will be copied into your application's libs folder and loaded on start-up.

      If I write the following:

      set_target_properties(myProject PROPERTIES
         QT_ANDROID_EXTRA_LIBS
            ${my_libs_dir}/${ANDROID_ABI}/libcrypto_3.so
            ${my_libs_dir}/${ANDROID_ABI}/libssl_3.so
            ${my_libs_dir}/${ANDROID_ABI}/libsodium.so
          )
      

      only libcrypto_3.so and libssl_3.so are copied to ${CMAKE_BINARY_DIR}/android-build/libs/${ANDROID_ABI}

      In order to get my libsodium.so copied I have to manually set the following

      message(WARNING "qtdeployandroid does not copying all libs")
      add_custom_target(tar_copy_lib)
      add_custom_command(
         TARGET tar_copy_lib
         COMMAND ${CMAKE_COMMAND} -E copy
            ${cAndroid_libs_source}/libsodium.so
            ${cAndroid_libs_destApk}/libsodium.so
         COMMENT "Copying libsodium.so"
      )
      add_dependencies(${CMAKE_PROJECT_NAME} tar_copy_lib)
      

      I think there is a bug in QT_ANDROID_EXTRA_LIBS or else there is a lack in the documentation.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            jozzolo José Del Romano
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes