Parsing toolchain feeds
<toolchain> <package name="foo-ctc" url="http://example.com/packages/foo-ctc.tar.gz" toolchain_file="cross-config.cmake" /> <package name="bar" url="http://example.com/packages/bar.tar.gz" />
And you run
$ qitoolchain create cross-foo http://example.com/feeds/cross.xml
for how XML parsing is done.
After every package has been parsed and added to the toolchain,
it is just a matter of
that the toolchain file is regenerated.
The toolchain file will then look like:
# Autogenerted file include("/path/to/a/ctc/cross-config.cmake") list(INSERT CMAKE_FIND_ROOT_PATH 0 "/path/to/a/ctc") list(INSERT CMAKE_FIND_ROOT_PATH 0 "/path/to/a/package")
will be added to the name of the known toolchains.
Then, when using
$ qibuild configure -c cross-foo my_project
object will be created, containing a
is a known name.
Then, a build directory name
will be created, and cmake will
be called, as if you had type:
$ cd ~/src/my_project/ $ mkdir build-cross-foo $ cmake -DCMAKE_TOOLCHAIN_FILE=~/.cache/qi/toolchains/cross-foo.cmake ..
And everything will just work:
You will go through the
, so the compiler to use will be
properly set, and you will have a entry in
to where the
has been extracted, so finding
libraries from the
package will also work.