-
Notifications
You must be signed in to change notification settings - Fork 33
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: applications that use bitpit should not relay on information gathered at configuration time #112
Conversation
I suppose no, there is no reason to have both finding dependencies. Your proposal fix the double search, but I think that is not a good solution to hard set the path used during bitpit compilation in external dependencies. A solution is to maintain the auto-find dependencies of bitpit (that I like) by keeping the find_package calls and appending the correct exposed variables to bitpit dependencies. Indeed, currently they are found but it seems to me that they are never used in bitpit configuration. Just as an example we can modify the find dependencies loop in BITPITConfig.cmake:
(One if scope it should be coded for each package without default ${_DEPENDENCY}_LIBRARIES and ${_DEPENDENCY}_INCLUDES names) In this way the last two hard sets are useless and they can be erased:
|
072c7ca
to
0e28707
Compare
I've implemented your idea. Tests were performed only on Linux. |
Can someone tests these changes on Windows? |
It works. |
…athered at configuration time
0e28707
to
316c403
Compare
Thanks for the tests. I've rebased the branch on the current master. Once the automatic tests finish I will do the merge. |
@alessandro-alaia noticed that BITPITConfig.cmake adds the external dependencies found during bitpit configuration to BITPIT_LIBRARIES, but, at the same time, it is also using the cmake find infrastructure to find the same dependencies.
Is there any specific reason why we need both?
In this pull request I'm proposing to remove the calls to the cmake find functions and relay entirely on the libraries found during bitpit configuration.