[Beignet] [PATCH] cmake: add check for drm_intel_bo_set_softpin_offset
Ruiling Song
ruiling.song at intel.com
Thu Dec 10 23:27:37 PST 2015
Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
CMakeLists.txt | 1 +
src/CMakeLists.txt | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e88a65..7ac007c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,6 +146,7 @@ IF(DRM_INTEL_FOUND)
MESSAGE(STATUS "Disable EU total query support")
MESSAGE(STATUS "Disable subslice total query support")
ENDIF(DRM_INTEL_VERSION VERSION_GREATER 2.4.59)
+ CHECK_LIBRARY_EXISTS(drm_intel drm_intel_bo_set_softpin_offset ${DRM_INTEL_LIBDIR} DRM_INTEL_SOFTPIN)
ELSE(DRM_INTEL_FOUND)
MESSAGE(FATAL_ERROR "Looking for DRM Intel (>= 2.4.52) - not found")
ENDIF(DRM_INTEL_FOUND)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 40a9afb..2788d3c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -129,6 +129,11 @@ SET(CMAKE_CXX_FLAGS "-DHAS_SUBSLICE_TOTAL ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-DHAS_SUBSLICE_TOTAL ${CMAKE_C_FLAGS}")
endif (DRM_INTEL_SUBSLICE_TOTAL)
+if (DRM_INTEL_SOFTPIN)
+ SET(CMAKE_CXX_FLAGS "-DHAS_SOFTPIN ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "-DHAS_SOFTPIN ${CMAKE_C_FLAGS}")
+endif (DRM_INTEL_SOFTPIN)
+
set(GIT_SHA1 "git_sha1.h")
add_custom_target(${GIT_SHA1} ALL
COMMAND chmod +x ${CMAKE_CURRENT_SOURCE_DIR}/git_sha1.sh
--
2.4.1
More information about the Beignet
mailing list