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

Better CMake targets #265

Closed
igfraga opened this issue Apr 7, 2021 · 2 comments
Closed

Better CMake targets #265

igfraga opened this issue Apr 7, 2021 · 2 comments

Comments

@igfraga
Copy link

igfraga commented Apr 7, 2021

It would be nice to have nice CMake targets like lib3mf::cppbindings. The recommended way to integrate with CMake (https://lib3mf.readthedocs.io/en/master/source/Cpp/LandingPage.html) is not great because it uses a global variable CMAKE_CURRENT_BINDING_DIR (which looks like an official cmake thing but I don't think it is).

On a general note, I'd love libraries to just define their targets and not touch the global environment at all, but it's an uphill battle in this dystopic cmake world we live in.

@waebbl
Copy link

waebbl commented Apr 7, 2021

As far as I can see, there's only one target which could be exported, the library lib3mf::lib3mf. The different bindings are just header interfaces which all need to use the library. But I agree, it would be more comfortable if there were config and target cmake files exported during build, not only a pkg-config file. This could also ease finding of correct header files by consumers of this library.

@vijaiaeroastro
Copy link
Collaborator

The refactoring done in PR #346 addressed this issue and introduces the lib3mf::lib3mf as a target to link to.

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

3 participants