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

Also set include directories for the BUILD_INTERFACE #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

morxa
Copy link
Contributor

@morxa morxa commented Aug 18, 2022

So far, the directory include/ was included into the include
directories by a global directive as well as using the
INSTALL_INTERFACE. However, when including the project with
FetchContent into another project, cmake uses the BUILD_INTERFACE to
declare target properties, in particular the target's include
directories, but it does not use the project-wide include directories.
Thus, also include the directory into each targets include directories
via its BUILD_INTERFACE.

This fixes build failures of projects that include freeopcua via FetchContent. Previously, those builds failed because the compiler could not find the header files.

Fixes robocup-logistics/gazebo-rcll#57.

So far, the directory `include/` was included into the include
directories by a global directive as well as using the
INSTALL_INTERFACE. However, when including the project with
FetchContent into another project, cmake uses the BUILD_INTERFACE to
declare target properties, in particular the target's include
directories, but it does not use the project-wide include directories.
Thus, also include the directory into each targets include directories
via its BUILD_INTERFACE.
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.

cannot find /opc/ua/client/client.h
1 participant