Skip to content
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

Problem: missing support for CMake (fix #265) #461

Merged
merged 18 commits into from
Jul 4, 2022

Conversation

damoncro
Copy link
Collaborator

@damoncro damoncro commented Jun 28, 2022

Solution:

  • Add basic cmake support and test cmake in CI
  • Move the libraries and bindings to sdk
  • Integrate x86_64 and amd64 in Makefile
  • Add linux_build.yml
  • Use rpath for mac dynamic library
  • Use so file for linux dynamic library
  • Simplify the process of build example by one make

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest main?
  • Have you checked your code compiles? (cargo build)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (cargo test)
  • Have you checked your code formatting is correct? (cargo fmt -- --check --color=auto)
  • Have you checked your basic code style is fine? (cargo clippy)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (cargo audit)
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Solution:
- Add cmake support
- Move the libraries and bindings to sdk
@damoncro damoncro requested review from leejw51crypto and tomtau and removed request for leejw51crypto June 28, 2022 03:39
@damoncro
Copy link
Collaborator Author

I am still working on cmake in windows.

Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should that helper.py be removed if this is now done via cmake?

@damoncro
Copy link
Collaborator Author

It is difficult at this moment, helper.py carries some string replacement works...

@damoncro
Copy link
Collaborator Author

damoncro commented Jun 28, 2022

This PR adds basic cmake support, considering that the users already downloaded or built the bindings and binaries, and would like to integrate cmake into their projects.

Created a follow up issue here to replace helper.py: #462

@damoncro damoncro marked this pull request as draft June 28, 2022 04:33
@tomtau
Copy link
Contributor

tomtau commented Jun 28, 2022

btw https://stackoverflow.com/questions/62648369/best-way-to-call-cargo-from-cmake

@tomtau
Copy link
Contributor

tomtau commented Jun 28, 2022

https://github.com/corrosion-rs/corrosion

@damoncro damoncro marked this pull request as ready for review July 4, 2022 02:09
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a cmake expert, so not sure if this follows all the modern idioms: https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1 https://cliutils.gitlab.io/modern-cmake/ but I guess it could be potentially improved in follow up PRs

@tomtau tomtau merged commit 48fbd79 into crypto-com:main Jul 4, 2022
@damoncro
Copy link
Collaborator Author

damoncro commented Jul 4, 2022

Cool references, I will check and improve in another PR, for example for #462 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants