Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1455

Cannot read property of another product

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 1.14.0
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      In a project of mine, I want to build the unit tests with the rpath set, so that they can be run even uninstalled with no need to specify environment variables. With qmake I would use something like

      QMAKE_LIBDIR += \
          $${TOP_BUILD_DIR}/lib/Mappero
      QMAKE_RPATHDIR = $${QMAKE_LIBDIR}
      

      and, according to this blog post, in QBS I should be able to achieve the same with

      Depend { name: "Mappero" }
      cpp.rpaths: [ product.Mappero.buildDirectory ]
      

      Unfortunately, though, the expression product.Mappero.buildDirectory evaluates to undefined, and after some debugging it appears that the same applies to all properties I define in that product (oddly enough, though, the product.Mappero.name properly expands).

      I'm attaching a minimal test case; you'll see that the warning line will say:

      WARNING: Setting rpath to pippoloundefined
      

      I'm using qbs 1.14 from git (cba28b26cdf93a74b52e1ec1635bee7107cb4995).

        Attachments

        1. qbs-test.tar.gz
          1.0 kB
          Alberto Mardegan
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            mardy Alberto Mardegan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes