Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Qbs support #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Qbs support #22

wants to merge 2 commits into from

Conversation

dragly
Copy link

@dragly dragly commented Feb 22, 2016

NOTE: This pull request is currently based on pull request #21 for C++ plugin support. They may however be separated if that's desirable.

Upon package installation a vendor.qbs file with a Project Item containing a Product Item named "vendor" is created.
The "vendor" project can then be added as Depends { name: "vendor" } in the client project.
The Product Item named "vendor" depends on all the provided packages.
The qpm.json file should contain a "qbs_filename" property and package.qbs should be similar to the following:

import qbs 1.0

Product {
    name: "net.ovilab.SimVis"
    type: "staticlibrary"

    Depends { name: 'cpp' }
    Depends { name: "Qt.core" }

    files: [
        "myfile.h",
        "myfile.cpp"
    }
}

Due to technical limitations making it impossible to add a Group Item inside another Group Item, a Product with type: "staticlibrary" is used.

Add vendor.h with qpm::init(app, engine) that initializes
each plugin listed in qpm.json.
Each plugin must be listed with the name of the C++ class
and the uri this class expects in registerTypes.
Each header needed for these classes must also be listed
in qpm.json:

    "headers": [
      "src/mymoduleplugin.h"
    ],
    "plugins": [
      {"class": "MyModulePlugin", "uri": "MyModule"}
    ]
Upon install a vendor.qbs file with a Project Item containing a
Product Item named "vendor" is created.
The "vendor" project can then be added as Depends { name: "vendor" }
in the client project.
The Product Item named "vendor" depends on all the provided
packages.
The qpm.json file should contain a "qbs_filename" property
and package.qbs should be similar to the following:

    import qbs 1.0

    Product {
        name: "net.ovilab.SimVis"
        type: "staticlibrary"

        Depends { name: 'cpp' }
        Depends { name: "Qt.core" }

        files: [
            "myfile.h",
            "myfile.cpp"
        }
    }

Due to technical limitations making it impossible to add a Group Item
inside another Group Item, a Product with type: "staticlibrary" is used.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant