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

Update cmake #198

Closed
wants to merge 3 commits into from
Closed

Update cmake #198

wants to merge 3 commits into from

Conversation

asyounis
Copy link
Contributor

Hi! Im working on integrating open_vins into a flying drone and needed to make some changes to the cmake files in order to get the code to compile and deploy onto a drone. I figured that these changes might be useful for others who may be looking to integrate open_vins onto various hardware platforms (like a drone or car). Please let me know if these seem acceptable (this is my first time contributing to an open source project like this)

Whats in this pull request:

  1. Bumping the cmake version
  2. Adding install targets to cmake
  3. Changing ov_eval_lib to a shared library
  4. Make building ov_eval optional

Most (if not all) of the changes in this pull request are for when building without catkin (aka no ROS).

Bumping the cmake version
2.8.8 is an old cmake version and it has trouble compiling in projects that use a 3.x version of cmake. Bumping the cmake version to a 3.x version makes it easier to compile open_vins into other projects that also use cmake 3 versions. I chose 3.3 since it is a low number cmake versions and thus should still work on most systems as most systems will have a cmake version higher than 3.3.

Adding install targets to cmake
When compiling and deploying open_vins for use on drones (without ROS) we need a way to install the shared library (.so files). Usually this is done with make install and therefore we need to specify what targets should be installed. I added install calls to the make file to specify those install targets as well as default locations to install those targets (the standard /usr/lib, /usr/include, ext).

Changing ov_eval_lib to a shared library
I noticed that "ov_eval_lib" was compiling as a static library when all the other libraries are compiling as a shared library. the ov_eval project also has a lot of executable targets and so I think there would be some benefit to making it a shared library

Make building ov_eval optional
When compiling open_vins for deployment on a drone, ov_eval is not needed. I added a flag to allow the developer to disable compilation of ov_eval (just like you can disable ROS) so that only ov_core and ov_msckf are compiled and installed.

…ed a 3.x version of some kind), added ability to optionally build ov_eval
…aries and apps for open_vins can be installed
@goldbattle
Copy link
Member

Closed via #209

@goldbattle goldbattle closed this Dec 13, 2021
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