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

c++ working standalone example #209

Open
gftabor opened this issue Aug 8, 2022 · 1 comment
Open

c++ working standalone example #209

gftabor opened this issue Aug 8, 2022 · 1 comment

Comments

@gftabor
Copy link

gftabor commented Aug 8, 2022

Is your feature request related to a problem? Please describe.
Trying to link against this project in C++ (to use the optimizer) doesn't seem well supported.

Here you discuss how to build from source and add the built packages as a python library, and nothing about make installing it as a C++ library.

Then in the examples cmake you assume the examples are being compiled alongside the library and all the environment variables are already known to cmake. https://github.com/symforce-org/symforce/blob/main/symforce/examples/CMakeLists.txt#L15

Describe the solution you'd like
A recommended way to install the project after building from source. (presumably sudo make install) This should provide FindSymForce.cmake etc for each separate module that might be needed by cmake.
Seems like it would be

  • symforce_gen
  • symforce_opt

Here you talk about splitting the c++ examples into separate cmakes, which would be nice but more importantly a standalone example (maybe its own repo) of compiling an example from source using an installed symforce. (Using standard find_package(symforce REQUIRED) in cmakelists)

@aaron-skydio
Copy link
Member

You should already be able to sudo make install (or the more modern cmake equivalent sudo cmake --install . as described here). This should install the C++ components of symforce, including symforce_gen and symforce_opt as you mention. We should probably mention in the build instructions that this is supported.

Agree that we should also provide a FindSymForce.cmake, we'll put that on the TODO list. Once we do that, yeah it'd be good to have some documentation or an example of how to build a project against an installed copy of symforce. If you or someone else wants to contribute any of this it would be appreciated :)

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

No branches or pull requests

2 participants