You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past few weeks, I have helped two coworkers write CMake for new projects that depend on the xrpl_core library1. There are probably more people outside the company who want to perform this task. Until recently, we had outdated instructions that haven't worked since the move to Conan because the project's CMake no longer downloads and builds its dependencies2.
My favored solution is to publish a Conan recipe for rippled and let dependents use Conan for their projects. We're already halfway there with the move to Conan for our own dependencies. In fact, fixing the package_infomethod in our recipe might be the only missing piece. It would be trivial to publish the recipe in this codebase, and I would consider that a success. It will be a separate effort to get the recipe included in ConanCenter, but that would be an even bigger success.
Footnotes
We should rename this to libxrpl before we invite even more dependents. ↩
Make it easy for projects to depend on libxrpl by adding an `ALIAS`
target named `xrpl::libxrpl` for projects to link.
The name was chosen because:
* The current library target is named `xrpl_core`. There is no other
"non-core" library target against which we need to distinguish the
"core" library. We only export one library target, and it should just
be named after the project to keep things simple and predictable.
* Underscores in target or library names are generally discouraged.
* Every target exported in CMake should be prefixed with the project
name.
By adding an `ALIAS` target, existing consumers who use the `xrpl_core`
target will not be affected.
* In the future, there can be a migration plan to make `xrpl_core` the
`ALIAS` target (and `libxrpl` the "real" target, which will affect the
filename of the compiled binary), and eventually remove it entirely.
Also:
* Fix the Conan recipe so that consumers using Conan import a target
named `xrpl::libxrpl`. This way, every consumer can use the same
instructions.
* Document the two easiest methods to depend on libxrpl. Both have been
tested.
* See #4443.
In the past few weeks, I have helped two coworkers write CMake for new projects that depend on the
xrpl_core
library1. There are probably more people outside the company who want to perform this task. Until recently, we had outdated instructions that haven't worked since the move to Conan because the project's CMake no longer downloads and builds its dependencies2.My favored solution is to publish a Conan recipe for rippled and let dependents use Conan for their projects. We're already halfway there with the move to Conan for our own dependencies. In fact, fixing the
package_info
method in our recipe might be the only missing piece. It would be trivial to publish the recipe in this codebase, and I would consider that a success. It will be a separate effort to get the recipe included in ConanCenter, but that would be an even bigger success.Footnotes
We should rename this to
libxrpl
before we invite even more dependents. ↩I'll be including updated instructions in new documentation. ↩
The text was updated successfully, but these errors were encountered: