package/nvidia-driver: become an OpenCL provider
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 20 Oct 2018 22:14:36 +0000 (00:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 3 Dec 2018 22:07:55 +0000 (23:07 +0100)
We need to install the mesa3d-headers, because the CL headers are not
provided by nvidia-driver (just like it didn't provide the OpenGL
headers).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/nvidia-driver/Config.in
package/nvidia-driver/nvidia-driver.mk

index 732d9255c7ca31c507b5f0983088925b00a868b7..9631b3e70c466e1daaa4f0e325a748fbac8ff050 100644 (file)
@@ -60,6 +60,11 @@ if BR2_PACKAGE_NVIDIA_DRIVER_CUDA
 
 config BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
        bool "OpenCL support"
+       select BR2_PACKAGE_MESA3D_HEADERS
+       select BR2_PACKAGE_HAS_LIBOPENCL
+
+config BR2_PACKAGE_PROVIDES_LIBOPENCL
+       default "nvidia-driver" if BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
 
 config BR2_PACKAGE_NVIDIA_DRIVER_CUDA_PROGS
        bool "CUDA MPS server and control"
index 0d051fcaa4488034635aeea82f635886b16fd80f..baf2ba2be5e0938ad9bc4aa99b18f3b97f34a1d1 100644 (file)
@@ -116,6 +116,8 @@ ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_OPENCL),y)
 NVIDIA_DRIVER_LIBS += \
        libOpenCL.so.1.0.0 \
        libnvidia-opencl.so.$(NVIDIA_DRIVER_VERSION)
+NVIDIA_DRIVER_DEPENDENCIES += mesa3d-headers
+NVIDIA_DRIVER_PROVIDES += libopencl
 endif
 
 # Build and install the kernel modules if needed