Allow using all pipeline nodes from a single executable #1208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will make it possible to compile the reusable parts of the executables once and then link into whatever destination needed, be it a part of user application, a standalone executable or a shared library.
Ability to not require usage of multiple executables is especially important on certain mobile platforms where this is not supported.
The idea behind the implementation is relatively simple: all aliceVision executables are compiled through a single CMake function (
alicevision_add_software
) and all entry points of these executables are already named asaliceVision_main
. Ifalicevision_add_software
is modified to compile the reusable code as a static library and redefinealiceVision_main
to a unique symbol, then all of such static libraries can be easily combined into a single executable.The current solution is the minimal one and the most simple one (whole PR is only around a hundred of lines). Going into the future we can expose the pipeline nodes better and provide more user-friendly API.