Hi Dmitry, Thanks !! That did the trick.
Br, Brian On Sun, Feb 1, 2015 at 8:23 PM, Dmitry Volosnykh <[email protected] > wrote: > The following should work: > > Project { > references: { > var qbsList = [...] > if (File.exists(sourceDirectory + "/my.qbs")) { > qbsList.push("my.qbs") > } > return qbsList > } > } > > On Sun, Feb 1, 2015 at 8:58 PM, McGillion, Brian < > [email protected]> wrote: > >> Hi All, >> >> I asked this question on irc the other day, so apologies to those who are >> being bombarded again. >> >> Under my Project { references : [ ] } >> >> I want to add a conditional reference if a file (another project's .qbs) >> exists. >> >> I have tried "File.exists('my.qbs') ? 'my.qbs' : []" and >> "File.exists('my.qbs') ? 'my.qbs' : '' " >> >> with the following results >> error: Expected array element of type String at index 4. >> error: Cycle detected while referencing file '' >> >> The next issue that I noticed is that "File.exists('my.qbs')" seems to >> require and absolute path and not a relative one. >> >> Does anyone know the best solution that is also portable, as this is a >> shared project so any hard coded absolute paths are not going to work too >> well. >> >> Thanks in advance, >> Brian >> >> _______________________________________________ >> QBS mailing list >> [email protected] >> http://lists.qt-project.org/mailman/listinfo/qbs >> >> >
_______________________________________________ QBS mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qbs
