Skip to content

Instantly share code, notes, and snippets.

@Kakadu
Created April 11, 2012 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kakadu/2359600 to your computer and use it in GitHub Desktop.
Save Kakadu/2359600 to your computer and use it in GitHub Desktop.
$ cat project.qbp
import qbs.base 1.0
Project {
moduleSearchPaths: "."
Application {
name: "helloworld"
files: ["code.ml"]//, "gamemap.cpp", "main.cpp" ]
Depends { name: "Qt.core" }
Depends { name: "cpp" }
Depends { name: "Qt.declarative" }
Depends { name: "ocaml" }
}
}
$ cat ocaml/OCamlModule.qbs
import qbs.base 1.0
Module {
name: "ocaml"
FileTagger {
pattern: "*.ml"
fileTags: ["ml"]
}
Rule {
// id: compile
inputs: ["ml"]
multiplex: true
Artifact {
fileName: input.basename + '.cmo'
fileTags: ["cmo"]
}
prepare: {
var cmd = new Command("ocaml -c", [input.basename] );
return cmd;
}
}
}
$ rm -rf build && qbs
Found project file /media/disk/kakadu/prog/lablqt/qml/test2qbs/project.qbp
loading project took: 107 ms
ERROR: No artifacts generated for product 'helloworld'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment