Skip to content

Conversation

@ericriff
Copy link
Contributor

I made them PRIVATE as a side effect of #1012
This introduces linking issues on some scenarios (if bt and its dependencies are built as shared libs, then the targets that depend on bt like the tests, tools and examples fail to link with undef symbols).

I moved then to private as a side effect of BehaviorTree#1012
This introduces linking issues on some scenarios
@ericriff ericriff marked this pull request as ready for review October 22, 2025 15:29
@facontidavide
Copy link
Collaborator

I am not a cmake expert but isn't the right solution instead to ass $<BUILD_INTERFACE: ?

@ericriff
Copy link
Contributor Author

I've only seen $<BUILD_INTERFACE: in the context of include directories. That would help with not found headers.
This is for linking issues.
And TBH I didn't do a super deep dive here, I noticed the linking issues and then compared current master with master before my changes from #1012. That made me realize that on my PR I moved these two deps from PUBLIC to PRIVATE (they used to be part of BTCPP_EXTRA_LIBRARIES). So I moved them back to PUBLIC and that took care of it.

@facontidavide
Copy link
Collaborator

The change in this PR did fix the problem when compiling with

cmake -S . -B build  -DBTCPP_SHARED_LIBS=OFF

But more need to be done in the context of conan, apparently

@ericriff
Copy link
Contributor Author

BTCPP_SHARED_LIBS only affects libraries built on this project. When you pull pre-compiled libraries (from conan or any other package manager, even a system pkg manager) I believe it has no effect.

@facontidavide
Copy link
Collaborator

yes, I know. This are two separate issues

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