chili-epfl / qimchi

Modular QML framework for AR, robotics and tangible interfaces
1 stars 4 forks source link

Way to build & install all/subset of modules #15

Open ayberkozgur opened 10 years ago

ayberkozgur commented 10 years ago

We need a way to build and install all or part of Qimchi modules with a single command. A simple shell/python script like the following (given that qmake points to the desired qmake) would work for building all modules:

for all subdirs in modules/
    cd subdir
    mkdir -p build-`qmake -query PLATFORM-SOMETHING`
    cd build-`qmake -query PLATFORM-SOMETHING`
    qmake ..
    make -j 5
    make install
    cd ../..

We can extend the script to accept the clean command which removes the previously created build directory.

We can supply a config file, potentially called modules.build that has the desired modules in it, one per line:

qt3d
cvcamera
chilitags

The user can then comment out any undesired module before running the script:

#qt3d
cvcamera
chilitags

One caveat with this is that currently, Chilitags depends on Qt3D for building with 3D functionality, so the following would not enable 3D functionality with Chilitags:

chilitags
cvcamera
qt3d

since the build order is important. There might be more examples like this in the future, so we should provide the qimchi.build file ourselves and tell the user to not change the module order in the file.

We should also definitely avoid circular dependencies when developing modules.

ayberkozgur commented 10 years ago

This whole thing assumes that necessary non-qimchi dependencies are installed into the host system. We can provide extensive documentation on how to do this for desktop & Android separately.