Build against sytem dependancies if available#97
Build against sytem dependancies if available#97Calandracas606 wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
If CLHPP, ICD-Loader, and Headers are installed on the system, use those instead of the submodules. This is beneficial when packaging the SDK for distribution, as the submodules can be built as their own seperate packages.
dd3146f to
7df34f0
Compare
|
Hi @Calandracas606, apologies for the gravely belated reaction. I recall seeing this PR but replying fell off the stack. I have one issue with this change: it's going to break some (non-exotic). Most commonly: you're driving Ubuntu and you have the
We've gone around this issue by releasing our own source packages. Does this cover your use case? If you are really looking to get source-code using the default naming scheme, consider contributing to the issue/discussion here, we're at the mercy of GitHub features here. |
|
Would adding an option such as That would keep the default behavior the same, but gives distributions the option to use system dependencies if preferred. |
MathiasMagnus
left a comment
There was a problem hiding this comment.
Yes, that could probably work. I have authored a repo to do extensive testing around the detection of OpenCL (primarily for #93). Feel free to repurpose that, if it's useful for testing whether the added options have unintended consequences.
If CLHPP, ICD-Loader, and Headers are installed on the system, use those instead of the sub-modules. This is beneficial when packaging the SDK for distribution, as the sub-modules can be built as their own separate packages.
While packaging for Void Linux, I ran into the issue of the ICD-Loader, Headers, and CLHPP being sub-modules. Since those dependencies can all be build and packaged independently, of the SDK, it is desirable to keep the separate.
Additionally, the release tarball does not contain the sub modules, so they must be fetched separately when packaging.
This PR is a very simple workaround that adds a check to see if those dependencies are already installed on the system, and to use the system packages instead if they are available.
Possible improvements that could be made to this PR if desired: