Kristian Amlie d9946929a6 chore: Make it possible to import common modules from other projects.
We do this by splitting `common`, `artifact` and `api` into their own
cmake projects.

Then we move the platform detection into `src/common`, since it is the
main responsible project, and it needs to be available to other
projects that import it. We also move the `config.h` here, and start
referring to it by its module path, so that it's less likely to clash.

We also adjust various path variables to refer mainly to
`PROJECT_SOURCE_DIR` instead of `CMAKE_SOURCE_DIR`, since the latter
is relative to the topmost project.

The common paths to the `src` directory, where the modules reside, as
well as the C++ `expected` and `optional` replacement libraries, are
now added to specific libraries instead of being global. This works
much better when other projects import the libraries than using global
settings, which are subject to project and directory scoping.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2024-02-01 16:10:38 +01:00
..
2023-02-22 14:28:26 +01:00