frankaemika / libfranka

C++ library for Franka research robots
https://frankaemika.github.io
Apache License 2.0
221 stars 147 forks source link

Updating to modern CMake? #80

Open HiImJulien opened 3 years ago

HiImJulien commented 3 years ago

This issue became quite lengthy; thus the TL;DR:


The lengthy, descriptive issue:

Hey there! At my work, we're using libFranka to command our pandas. It turned out to be quite hard to set up the dependencies on Windows for libFranka to compile properly.

To mitigate those issues, I wrote a "new" CMakeLists, with the following changes:

This allows us, to use libFranka, without actually installing it. E.g. in our projects, we use FetchContent (or to be more precise, CPMFindPackage, which is find_package + FetchContent but in useful) to download libFranka and resolve its dependencies with the procedure described above. This doesn't require the user to have anything set up, besides a proper C++14 Compiler and CMake, and makes the build "bulletproof".

I'd like to open a pull request and incorporate those changes, as well as other changes that clean up the build scripts.

This would allow anyone to get libFranka, your work, running easily, without any hassles.

However, this would require at least CMake 3.13 and a bit more work from my side. Would you accept such a contribution?

Regards, Julian

P.S.: The fork I am working on currently, is not done yet, but works for builds using libFranka