Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23215

CMake ANDROID_EXTRA_LIBS evaluates all files in the list as a single filesystem path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.10.2
    • Android Support
    • None
    • Using CMake as my build system
      Qt-creator 4.10.2
      Ubuntu 18.04
      Qt 5.12.5

    • All

    Description

      I am trying to get ROS2 working with Android using qt. I have CMake as my build system. I'm using Qt-creator 4.10.2 on Ubuntu 18.04. 

        

      There are a lot of shared libraries that ROS2 uses, but luckily ANDROID_EXTRA_LIBS is provided as a way to allow my application to use those libraries.

       

      But when I'm setting ANDROID_EXTRA_LIBS  like this:

      set(ANDROID_EXTRA_LIBS /home/johnconn/external_storage/ros2_core_android_ws/install/device/action_msgs/lib/libaction_msgs__rosidl_typesupport_cpp.so /home/johnconn/external_storage/ros2_core_android_ws/install/device/action_msgs/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so CACHE INTERNAL "") 

       

       

      I get a compile error that looks like this:

       

       

      -- Skipping file /home/johnconn/external_storage/qt/5.13/5.12.5/android_armv7/plugins/External library /home/johnconn/external_storage/ros2_core_android_ws/install/device/action_msgs/lib/libaction_msgs__rosidl_typesupport_cpp.so;/home/johnconn/external_storage/ros2_core_android_ws/install/device/action_msgs/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so does not exist! 
      
      

       

      Which makes me think qt-creator is not respecting my list of files and is instead converting the cmake list to a string, and evaluating the string as a single file. 

       

      That seems to be what's happening in androidbuildapkstep.cpp in the qt-creator source:

       QString extraLibs = node->data(Android::Constants::AndroidExtraLibs).toString();
       if (!extraLibs.isEmpty())
       deploySettings["android-extra-libs"] = extraLibs;

       But I'm not an expert in that codepath. 

      Attachments

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

        Activity

          People

            portale Alessandro Portale
            johnconn John Connolly
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes