mirror of
https://github.com/mendersoftware/mender.git
synced 2025-03-14 10:25:13 +00:00
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>