-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make InstallBasicPackageFiles FetchContent / add_subdirectory friendly #162
Comments
In general, the problem for this are the use of
|
I hope to have got the point correct since I have never dealt with project inceptions. I'll ask some questions to understand the context and also to clarify the situation.
@traversaro could yuo please complete the sentence 😄 ? Thanks! My first thought about this external projects into project using Anyway:
Basically we could to give a higher "scope of visibility" to InstallBasicPackageFiles.cmake for those variable to allow this particular |
This workflow is actually the one for which the new CMake module |
Section 27.2 of Professional CMake: A Practical Guide is related to this discussion. |
…ad of CMAKE_{SOURCE,BINARY}_DIR This should make it FetchContent friendly. The Config.cmake.in file is no longer searched in the root directory, only current source directory is supported. Fixes robotology#162
I don't like the idea of using |
Fixed by #233 |
A current trend in some CMake projects is to include external dependencies using
add_subdirectory
command. In general this does not work (due to cross talking between the two projects, see https://www.reddit.com/r/cpp/comments/8sie4b/i_manage_the_release_cycle_for_cmake_the_build/e11imjh/ ) but if the external dependency is simple enough, it is quite convenient.This workflow is actually the one for which the new CMake module
FetchContent
has been designed, as you may see in the FetchContent docs.Ideally, it would be great if using InstallBasicPackageFiles in one project did not prevented to use of the project using
FetchContent
/add_subdirectory
. Unfortunatly at the moment this is not the case, as described in robotology/idyntree#397 .The text was updated successfully, but these errors were encountered: