forked from mendersoftware/mender
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Kristian Amlie
committed
Feb 1, 2024
1 parent
3ffcfeb
commit d994692
Showing
31 changed files
with
90 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[submodule "vendor/json"] | ||
path = vendor/json | ||
path = src/common/vendor/json | ||
url = https://github.com/nlohmann/json.git | ||
[submodule "vendor/lmdbxx"] | ||
path = vendor/lmdbxx | ||
path = src/common/vendor/lmdbxx | ||
url = https://github.com/hoytech/lmdbxx.git | ||
[submodule "vendor/tiny-process-library"] | ||
path = vendor/tiny-process-library | ||
path = src/common/vendor/tiny-process-library | ||
url = https://gitlab.com/eidheim/tiny-process-library.git | ||
[submodule "vendor/expected"] | ||
path = vendor/expected | ||
path = src/common/vendor/expected | ||
url = https://github.com/TartanLlama/expected.git | ||
[submodule "vendor/optional-lite"] | ||
path = vendor/optional-lite | ||
path = src/common/vendor/optional-lite | ||
url = https://github.com/martinmoene/optional-lite.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
project(mender-api) | ||
|
||
add_library(api_auth STATIC auth/auth.cpp) | ||
target_link_libraries(api_auth PUBLIC | ||
common_log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule expected
updated
from 000000 to 3f0ca7
Submodule json
updated
from 000000 to 7f72ee
Submodule lmdbxx
updated
from 000000 to 08edda
Submodule optional-lite
updated
from 000000 to 00e9cf
Submodule tiny-process-library
updated
from 000000 to 6166ba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.