-
Notifications
You must be signed in to change notification settings - Fork 3
[RSDK-11420] - Use conan for cpp-sdk dep #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
03ac8be
Conan for jetson working
seanavery 57f9906
Hook up conan package path
seanavery 2de685d
Handle conan caching
seanavery f14807f
Update ci
seanavery df2e171
Remove cpp sdk includes from jetson
seanavery 6e14bb8
Remove cpp sdk from jetson base image
seanavery 461ea8e
Use 8vcpu
seanavery ba3cc28
Run unit tests on conan build
seanavery 672db22
Clean up conan setup
seanavery 18f0da8
Venv change
seanavery 9c2025a
Conan builds for pi
seanavery 50891ae
Fix unit test
seanavery dba0b1d
Install deps in conan build
seanavery 8de1cde
8vcpu
seanavery cc545ca
Patch fo rust utils on old bullseye
seanavery 3b3e7a8
Fix rust utils bug on bullseye
seanavery 6106d0f
Use conan cache
seanavery ed0231c
Clean up makefile debug
seanavery 95594ca
Simplify venv stuff
seanavery e73d378
Remove conan build test
seanavery 0277db4
Remove cpp sdk from pi image
seanavery c0cb920
Bump base images to 0.0.7
seanavery 5583896
Need ssl for libcamera
seanavery a294e91
Bump containers to 0.0.8
seanavery 2829d39
Update make
seanavery a48121e
Clean up pi recipe
seanavery 650162f
Remove ldd check
seanavery File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import re | ||
|
|
||
| from conan import ConanFile | ||
| from conan.tools.build import check_min_cppstd | ||
| from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout | ||
| from conan.tools.files import load | ||
|
|
||
|
|
||
| class ViamCsi(ConanFile): | ||
| name = "viam-csi" | ||
| license = "Apache-2.0" | ||
| url = "https://github.com/viam-modules/csi-camera" | ||
| package_type = "application" | ||
|
|
||
| settings = "os", "compiler", "build_type", "arch" | ||
| options = {"with_tests": [True, False]} | ||
| default_options = { | ||
| "with_tests": False, | ||
| "viam-cpp-sdk/*:shared": False, | ||
| } | ||
|
|
||
| exports_sources = ( | ||
| "CMakeLists.txt", | ||
| "LICENSE", | ||
| "main.cpp", | ||
| "csi_camera.cpp", | ||
| "csi_camera.h", | ||
| "utils.cpp", | ||
| "utils.h", | ||
| "constraints.h", | ||
| "tests/*", | ||
| ) | ||
|
|
||
| version = "0.0.2" | ||
|
|
||
| def set_version(self): | ||
| content = load(self, "CMakeLists.txt") | ||
| match = re.search(r"project\([^\)]*VERSION\s+([0-9]+\.[0-9]+\.[0-9]+)", content, re.MULTILINE | re.DOTALL) | ||
| if match: | ||
| self.version = match.group(1).strip() | ||
|
|
||
| def validate(self): | ||
| check_min_cppstd(self, 17) | ||
|
|
||
| def requirements(self): | ||
| # Phase 1 scope: migrate viam-cpp-sdk sourcing to Conan. | ||
| self.requires("viam-cpp-sdk/0.20.1") | ||
|
|
||
| def layout(self): | ||
| cmake_layout(self, src_folder=".") | ||
|
|
||
| def generate(self): | ||
| tc = CMakeToolchain(self) | ||
| tc.variables["VIAM_CSI_ENABLE_TESTS"] = self.options.with_tests | ||
| tc.generate() | ||
| CMakeDeps(self).generate() | ||
|
|
||
| def build(self): | ||
| cmake = CMake(self) | ||
| cmake.configure() | ||
| cmake.build() | ||
|
|
||
| def package(self): | ||
| cmake = CMake(self) | ||
| cmake.install() |
This file contains hidden or 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.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you use latest tag so you don't have to change if the image gets updated?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, created a ticket. Will do in a follow-up PR.