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

Exporting <package-name>Config.cmake files with no targets. #398

Closed
olivier-stasse opened this issue Jun 9, 2020 · 7 comments
Closed

Exporting <package-name>Config.cmake files with no targets. #398

olivier-stasse opened this issue Jun 9, 2020 · 7 comments

Comments

@olivier-stasse
Copy link
Member

When having pure data package, typically robot_description kind of packages, the Config.cmake files are very handy.
However they do not have targets. In the current writing of the SETUP_PROJECT_PACKAGE_FINALIZE macro the INSTALL( export ) calls fails because they are no targets to export.
IMHO the correct behavior is to not call this install when there is no target.

olivier-stasse added a commit to olivier-stasse/jrl-cmakemodules that referenced this issue Jun 9, 2020
Do not call INSTALL(EXPORT ...) when having no targets but generates the Config.cmake file.
olivier-stasse added a commit that referenced this issue Jun 9, 2020
Do not call INSTALL(EXPORT ...) when having no targets but generates the Config.cmake file.
@nim65s
Copy link
Collaborator

nim65s commented Jun 9, 2020

Hi @olivier-stasse,

Where do you have this issue ?
All SoT packages have at least an INTERFACE target, eg. :

https://github.com/stack-of-tasks/tiago_data/blob/75750a1da675319f30534e3383a657e9178e8d60/CMakeLists.txt#L19

@olivier-stasse
Copy link
Member Author

talos_data when gazebo is not detected.

@nim65s
Copy link
Collaborator

nim65s commented Jun 9, 2020

Can you please open an issue on talos-data, before working further on that topic ? This looks like stack-of-tasks/talos-data#2 to me.

@olivier-stasse
Copy link
Member Author

I respectfully disagree. jrl-cmakemodules should be able to handle package with no target.

@olivier-stasse olivier-stasse reopened this Jun 9, 2020
@olivier-stasse
Copy link
Member Author

But of course this is a personal opinion that should be discussed openly and I will go towards the community decision.
Note: my solution is partial. Because Config.cmake.in impose to include Targets.cmake this later trigger an error on a package using it.

@nim65s
Copy link
Collaborator

nim65s commented Jun 9, 2020

I agree, jrl-cmakemodules should be able to handle package with no target. But I would like to understand the issue you are trying to solve on talos-data. That was the topic I was speaking of, sorry this was not clear.

gergondet added a commit that referenced this issue Jun 9, 2020
…o targets but generates the Config.cmake file."

This reverts commit 5d602f8.
gergondet added a commit that referenced this issue Jun 9, 2020
…o targets but generates the Config.cmake file."

This reverts commit 5d602f8.
@olivier-stasse
Copy link
Member Author

Fixed by PR #408

jcarpent pushed a commit to jcarpent/jrl-cmakemodules that referenced this issue Jun 23, 2020
Do not call INSTALL(EXPORT ...) when having no targets but generates the Config.cmake file.
jcarpent pushed a commit to jcarpent/jrl-cmakemodules that referenced this issue Jun 23, 2020
…en having no targets but generates the Config.cmake file."

This reverts commit 5d602f8.
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

No branches or pull requests

2 participants