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 is unable to find BehaviorTreeV3 since upgrading to v3.8 #461

Closed
koonpeng opened this issue Nov 2, 2022 · 5 comments
Closed

CMake is unable to find BehaviorTreeV3 since upgrading to v3.8 #461

koonpeng opened this issue Nov 2, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@koonpeng
Copy link

koonpeng commented Nov 2, 2022

The latest release of BehaviorTree in ROS humble (version 3.8.0-1jammy.20221019.164714) changed the package config file from BehaviorTreeV3Config.cmake to behaviortree_cpp_v3Config.cmake, this causes current projects using BehaviorTree via cmake's find_package to break.

@facontidavide
Copy link
Collaborator

sorry about that.

On the other hand... it seems like there is an easy fix, isn't it?

@koonpeng
Copy link
Author

koonpeng commented Nov 3, 2022

Yeah, it can be easily fixed by looking for behaviortree_cpp_v3 instead. But given that this is not a major release, I thought this change is not intended.

@facontidavide
Copy link
Collaborator

I can understand you frustration, anyway that name was "wrong" in the first place...

Do you think it would be possible to add BOTH the names simultaneously? I mean adding (not replacing):

INSTALL(TARGETS ${BEHAVIOR_TREE_LIBRARY}
    EXPORT BehaviorTreeV3Config
    ARCHIVE DESTINATION ${BEHAVIOR_TREE_LIB_DESTINATION}
    LIBRARY DESTINATION ${BEHAVIOR_TREE_LIB_DESTINATION}
    RUNTIME DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION}
    )

install(EXPORT BehaviorTreeV3Config
    DESTINATION "${BEHAVIOR_TREE_LIB_DESTINATION}/BehaviorTreeV3/cmake"
    NAMESPACE BT::)

export(TARGETS ${PROJECT_NAME}
    NAMESPACE BT::
    FILE "${CMAKE_CURRENT_BINARY_DIR}/BehaviorTreeV3Config.cmake")
 

facontidavide added a commit that referenced this issue Nov 22, 2022
@facontidavide
Copy link
Collaborator

I think this is the solution to your problem.
I think that some ROS people will hate me, but that's life...

4ddc0b0

@facontidavide facontidavide added the help wanted Extra attention is needed label Nov 23, 2022
@facontidavide
Copy link
Collaborator

Sorry, but that doesn't work. if anybody with more knowledge about cmake wants to help he/she is very welcome.

I think the best course of action is to keep the new name behaviortree_cpp_v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants