From 36672e8b3526a8c70c915e7b93b0d4040342f4ec Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Wed, 9 Sep 2020 15:08:51 +0800 Subject: intel-mediasdk: add PACKAGECONFIG for opencl Enables the OpenCL dependent code (which right now is just a sample) to be built. Signed-off-by: Anuj Mittal --- ...cmake-don-t-look-for-driver-at-build-time.patch | 35 ++++++++++++++++++++++ .../mediasdk/intel-mediasdk_20.2.1.bb | 5 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 recipes-multimedia/mediasdk/files/0001-FindOpenCL.cmake-don-t-look-for-driver-at-build-time.patch (limited to 'recipes-multimedia') diff --git a/recipes-multimedia/mediasdk/files/0001-FindOpenCL.cmake-don-t-look-for-driver-at-build-time.patch b/recipes-multimedia/mediasdk/files/0001-FindOpenCL.cmake-don-t-look-for-driver-at-build-time.patch new file mode 100644 index 00000000..34ffb912 --- /dev/null +++ b/recipes-multimedia/mediasdk/files/0001-FindOpenCL.cmake-don-t-look-for-driver-at-build-time.patch @@ -0,0 +1,35 @@ +From cc30986a6033e3b3b8709cf62a84bd832209e493 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Wed, 9 Sep 2020 15:04:14 +0800 +Subject: [PATCH] FindOpenCL.cmake: don't look for driver at build time + +We don't need the icd driver to be present when building. + +Upstream-Status: Inappropriate + +Signed-off-by: Anuj Mittal +--- + builder/FindOpenCL.cmake | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/builder/FindOpenCL.cmake b/builder/FindOpenCL.cmake +index ed531bc8..d8ac00a6 100644 +--- a/builder/FindOpenCL.cmake ++++ b/builder/FindOpenCL.cmake +@@ -25,13 +25,11 @@ set( OCL_LIBS "" ) + + if ( NOT OPENCL_INCLUDE MATCHES NOTFOUND ) + if ( NOT OPENCL_LIBRARY MATCHES NOTFOUND ) +- if ( EXISTS /etc/OpenCL/vendors/intel.icd ) + set ( OPENCL_FOUND TRUE ) + + get_filename_component( OPENCL_LIBRARY_PATH ${OPENCL_LIBRARY} PATH ) + + list( APPEND OPENCL_LIBS OpenCL ) +- endif() + endif() + endif() + +-- +2.26.2 + diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_20.2.1.bb b/recipes-multimedia/mediasdk/intel-mediasdk_20.2.1.bb index a9e68f87..5a7439c0 100644 --- a/recipes-multimedia/mediasdk/intel-mediasdk_20.2.1.bb +++ b/recipes-multimedia/mediasdk/intel-mediasdk_20.2.1.bb @@ -25,10 +25,13 @@ PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d) " PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" +PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, ocl-icd opencl-clhpp opencl-headers" PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" -SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;branch=${BPN}-20.2;lfs=0" +SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;branch=${BPN}-20.2;lfs=0 \ + file://0001-FindOpenCL.cmake-don-t-look-for-driver-at-build-time.patch \ + " SRCREV = "f7ae8497b3e58a0ef8ad4ac94256f04928c20456" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf