summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch
blob: 87c4e82e67f6ec4f21cd3ff4063f733da381ce11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From be7cec47777bd35c44a59f2af73f12ce9c26d65c Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
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 <anuj.mittal@intel.com>
---
 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