[Beignet] add DRM_LIBDIR into link directory list

Li Peng peng.li at linux.intel.com
Mon May 26 04:01:55 PDT 2014


Then beignet can link to preferred drm library rather than default

Signed-off-by: Li Peng <peng.li at intel.com>
---
 backend/src/CMakeLists.txt | 4 ++--
 benchmark/CMakeLists.txt   | 2 +-
 src/CMakeLists.txt         | 2 +-
 utests/CMakeLists.txt      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
index 1dfbcf6..37945d9 100644
--- a/backend/src/CMakeLists.txt
+++ b/backend/src/CMakeLists.txt
@@ -175,7 +175,7 @@ else (GBE_USE_BLOB)
 endif (GBE_USE_BLOB)
 
 include_directories (.)
-link_directories (${LLVM_LIBRARY_DIRS})
+link_directories (${LLVM_LIBRARY_DIRS} ${DRM_LIBDIR})
 include_directories(${LLVM_INCLUDE_DIRS})
 add_library (gbe STATIC ${GBE_SRC})
 
@@ -205,7 +205,7 @@ if (LLVM_VERSION_NODOT VERSION_EQUAL 34)
   endif (${TERMINFO} STREQUAL TERMINFO-NOTFOUND)
 endif(LLVM_VERSION_NODOT VERSION_EQUAL 34)
 
-link_directories (${LLVM_LIBRARY_DIR})
+link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR})
 ADD_EXECUTABLE(gbe_bin_generater gbe_bin_generater.cpp)
 TARGET_LINK_LIBRARIES(gbe_bin_generater gbe)
 
diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt
index fb28023..d96a2e0 100644
--- a/benchmark/CMakeLists.txt
+++ b/benchmark/CMakeLists.txt
@@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
                     ${CMAKE_CURRENT_SOURCE_DIR}/../include)
 
 
-link_directories (${LLVM_LIBRARY_DIR})
+link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR})
 set (benchmark_sources
   ../utests/utest_error.c
   ../utests/utest_assert.cpp
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8164a44..c03dbe1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -69,7 +69,7 @@ endif (OCLIcd_FOUND)
 
 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic,--allow-shlib-undefined")
 
-link_directories (${LLVM_LIBRARY_DIR})
+link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR})
 add_library(cl SHARED ${OPENCL_SRC})
 target_link_libraries(
                       cl
diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
index 704438d..20ec627 100644
--- a/utests/CMakeLists.txt
+++ b/utests/CMakeLists.txt
@@ -19,7 +19,7 @@ configure_file (
   )
 
 #XXX only need GL if required
-link_directories (${LLVM_LIBRARY_DIR} ${OPENGL_LIBDIR})
+link_directories (${LLVM_LIBRARY_DIR} ${OPENGL_LIBDIR} ${DRM_LIBDIR})
 set (utests_sources
   utest_error.c
   compiler_basic_arithmetic.cpp
-- 
1.9.1





More information about the Beignet mailing list