From def5c495ea4f55769a548971c36a2b2686edbe8a Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Wed, 7 Oct 2020 12:54:12 +0800 Subject: intel-mediasdk: add PACKAGECONFIG for itt Signed-off-by: Anuj Mittal --- ...ITT.cmake-fix-detection-of-header-library.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch (limited to 'recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch') diff --git a/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch b/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch new file mode 100644 index 00000000..87c4e82e --- /dev/null +++ b/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch @@ -0,0 +1,49 @@ +From be7cec47777bd35c44a59f2af73f12ce9c26d65c Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Wed, 7 Oct 2020 09:33:06 +0800 +Subject: [PATCH] FindITT.cmake: fix detection of header/library + +Use find_library to check for the library so distributions installing to +standard locations can also work in addition to custom paths specified +using CMAKE_ITT_HOME. + +Also add ittnotify to PATH_SUFFIXES for header for cases when +ittnotify.h is installed in /usr/include/ittnotify for example. + +Upstream-Status: Submitted + +Signed-off-by: Anuj Mittal +--- + builder/FindITT.cmake | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/builder/FindITT.cmake b/builder/FindITT.cmake +index ba2542c5..d96acf2e 100644 +--- a/builder/FindITT.cmake ++++ b/builder/FindITT.cmake +@@ -35,19 +35,19 @@ if( ENABLE_ITT ) + + find_path( ITT_INCLUDE_DIRS ittnotify.h + PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} +- PATH_SUFFIXES include ) ++ PATH_SUFFIXES include ittnotify) + + # Unfortunately SEAPI and VTune uses different names for itt library: + # * SEAPI uses libittnotify${arch}.a + # * VTune uses libittnotify.a + # We are trying to check both giving preference to SEAPI name. +- find_path( ITT_LIBRARY_DIRS libittnotify${arch}.a ++ find_library( ITT_LIBRARY_DIRS ittnotify${arch} + PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} + PATH_SUFFIXES lib64 ) + if( NOT ITT_LIBRARY_DIRS MATCHES NOTFOUND ) + set( ITT_LIBRARIES "ittnotify${arch}" ) + else() +- find_path( ITT_LIBRARY_DIRS libittnotify.a ++ find_library( ITT_LIBRARY_DIRS ittnotify + PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME} + PATH_SUFFIXES lib64 ) + if( NOT ITT_LIBRARY_PATH MATCHES NOTFOUND ) +-- +2.26.2 + -- cgit v1.2.3-54-g00ecf