[QBS] How qbs searchs for modules?

Kakadu KakaduHafanana at yandex.ru
Wed Apr 11 14:54:11 CEST 2012


Hello!

I want to implement a build system for OCaml language. And (AFAU) I should write specific module and set some rules.

$ cat OCamlModule.qbs 
import qbs.base 1.0

Module {
  name: "ocaml"
  FileTagger {
    pattern: "*.ml"
    fileTags: ["ml"]
  }
  Rule {
    id: "compile"
    prepare: {
            var cmd = new Command("ocaml -c", input.basename );
            return cmd;      
      
    }
  }
}
$ cat test2.qbp 
import qbs.base 1.0
//import OCamlModule 1.0 as OCaml
 
Application {
           name: "helloworld"
           files: ["main.cpp", "a.ml"]
           Depends { name: "Qt.core" }
           Depends { name: "cpp" }
           Depends { name: "Qt.declarative" }
//           Depends { name: "OCaml" }
}

I have put OCamlModule.qbs to the same directory where qbp file is located. But qbs can see my module? How to explain qbs where search dependencies? Or Maybe I can put everything in the whole file?
-- 
Best wishes,
Kakadu



More information about the Qbs mailing list