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:
Bumping the cmake version
Adding install targets to cmake
Changing ov_eval_lib to a shared library
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.
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:
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.