mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
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
|
|
|