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

CMake: major refactoring. Added install command. #9

Closed
wants to merge 1 commit into from

Conversation

Thordreck
Copy link

Hi,
This pull request includes a re-factoring of the CMake. A install command has been added to be able to install the project as a standalone library (or within catkin as well) so users can just find_package it. The standalone installation supports version numbering. External dependencies (threads, dl and [zmq]) and headers paths are included in the cmake target, so it can be imported and used in external projects easily:

find_package(behavior_tree_core 1.0 REQUIRED)
target_link_libraries(Foo behavior_tree_core)

I had to change the minimum required CMake version up to 3.1 to use some features. Tell me if this is an issue.
Also, to be able to use it as a catkin module I had to include the 3rdparty folder in the catkin_package, but there was a comment explicitly discouraging it. I may have to look deeper into this.
I plan on adding deb packages generation later down the road if you think it would be a good addition.

@facontidavide
Copy link
Collaborator

Thanks :)

I noticed that the unit trest fails https://travis-ci.org/BehaviorTree/BehaviorTree.CPP/builds/454661547?utm_source=github_status&utm_medium=notification

Can you check it out.

Please don't include 3rdparty in the set on INCLUDE directories in ROS, since that may represent a problem (multiple versions of tinyXML2, in particular).

@Thordreck
Copy link
Author

I checked the tests. The kinetic one seems to be fine. If I'm not mistaken the no-ros test is failing because test executables are not being placed into the bin/ folder and if fails to launch them, while the indigo test is failing due to the required minimum cmake version (it seems to only have version 2.8 installed).
Let me rethink the issue with the version and the 3rdparty folder and I'll push again.
Cheers.

facontidavide pushed a commit that referenced this pull request Nov 15, 2018
@facontidavide
Copy link
Collaborator

I am cherry picking your changes.

Please take a look at this branch... https://github.com/BehaviorTree/BehaviorTree.CPP/tree/cmake_fix
I have to think more about the installation.

facontidavide added a commit that referenced this pull request Nov 16, 2018
* fix travis
* better installation with renamed directories
@facontidavide
Copy link
Collaborator

I included many changes to the CMake file, mostly from you.
I had to fix the compilation in Ubuntu 14.04 and catkin, but now it is fine.

I left out for the time being the support you proposed for the version of the library.

I am closing this PR, because, after the latest changes, there are several conflicts.

THANK YOU for contributing, your PR motivated me to do things better.

@Thordreck Thordreck deleted the cmake_refactor branch October 2, 2019 15:44
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