[Beignet] [PATCH] buildsys: Use CMRT_LIBDIR instead of CMRT_LIBRARY_DIRS

Guo, Yejun yejun.guo at intel.com
Sat Oct 8 02:18:46 UTC 2016


Hi Armin,

thanks for your patch. 

We use pkg_check_modules(CMRT libcmrt) in path_of_beignet/CMakeList.txt Line 173 to detect libcmrt.  CMRT_INCLUDE_DIRS and CMRT_LIBRARY_DIRS are the expected macro to use, see https://cmake.org/cmake/help/v3.0/module/FindPkgConfig.html or https://cmake.org/cmake/help/v2.8.12/cmake.html. Could you explain a bit more of your environment? thanks.

btw, do you use the feature to "make Beignet as intermedia layer of CMRT"? Want to know if any real cases from the community.

thanks
yejun

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Armin K
Sent: Wednesday, October 05, 2016 10:33 PM
To: beignet at lists.freedesktop.org
Cc: Armin K
Subject: [Beignet] [PATCH] buildsys: Use CMRT_LIBDIR instead of CMRT_LIBRARY_DIRS

CMRT_LIBRARY_DIRS doesn't include any library paths
when the library is installed system-wide, such as
/usr.

Also dlopen versioned library, as distros tend to
split non-versioned sonames into -devel packages.

Signed-off-by: Armin K <krejzi at email.com>
---
 src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a002865..82be7ff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -103,7 +103,7 @@ endif (X11_FOUND)
 
 if (CMRT_FOUND)
   set(CMAKE_CXX_FLAGS "-DHAS_CMRT ${CMAKE_CXX_FLAGS}")
-  set(CMAKE_CXX_FLAGS "-DCMRT_PATH=${CMRT_LIBRARY_DIRS}/libcmrt.so ${CMAKE_CXX_FLAGS}")
+  set(CMAKE_CXX_FLAGS "-DCMRT_PATH=${CMRT_LIBDIR}/libcmrt.so.1 ${CMAKE_CXX_FLAGS}")
   set(CMAKE_C_FLAGS "-DHAS_CMRT ${CMAKE_C_FLAGS}")
   set(OPENCL_SRC ${OPENCL_SRC} cl_cmrt.cpp)
 endif (CMRT_FOUND)
-- 
2.9.3

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list