[QBS] How to getting the directory contained the qbs file.

罗勇刚(Yonggang Luo) luoyonggang at gmail.com
Mon Nov 18 07:25:27 CET 2013


for example, I have a script dll_template.qbs file located in dir
"testQbs\", the content is:
import qbs
Product {
    Depends { name: "cpp" }
    Depends { condition: project.enableUnitTests; name: "Qt.test" }
    type: "dynamiclibrary"
    cpp.includePaths: [

        "$(CurrentQbsFileDirectory)\somepath"

    ]
}


and have the other qbs scrit dll_a.qbs localted in dir "testQbs\testA\",
the content is:
import qbs
from "../dll_template.qbs" as Dll
Dll {
   name: "DllA"
   files:  [
     "testA.cpp"
   ]
}


So that the in product DllA, the cpp can have the include path
"testQbs\somepath"

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20131118/b6e08cd2/attachment.html>


More information about the Qbs mailing list