How to add submodule after configuring and building?
-
I have built Qt6 using source code according to manual from official web-site. Anyway, I would like to add a submodule (qtcharts).
Official manual advices following thing:You can always add or remove individual submodules later with git submodule init/deinit.
Unfortunately, I don't really understand how I can do it. Can somebody give an advice? Thank you in advance. -
Hi,
You have to go into your Qt clone, and there use
git submodule init qtcharts
. -
@SGaist Apologies for reviving an old thread, but I wanted to expand on this response, as it comes up when searching for similar questions. The answer you gave is exactly what is given in the instructions for building Qt from git and is correct, but incomplete.
After running
git submodule init qtcharts
(as in this example), you also need to rungit submodule update .
inside theqtcharts
directory, and then reconfigure the build. This may be obvious to people used to working with git submodules, but took me a few minutes to figure out.