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

Armin K krejzi at email.com
Wed Oct 5 14:32:47 UTC 2016


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



More information about the Beignet mailing list