on Linux detect gmmlib using pkg-config only

Change-Id: If2c4350ff9e92ec5dd6b9588a00906aecae62575
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2018-11-05 16:10:05 +01:00
committed by sys_ocldev
parent 1cd59e927a
commit 4284217dea

View File

@@ -254,7 +254,7 @@ if(WIN32)
endif()
# GmmLib detection
if(NOT GMMUMD_LIB_NAME)
if(NOT DEFINED GMMUMD_LIB_NAME)
if(TARGET igfx_gmmumd_dll)
set(GMMUMD_LIB_NAME "igfx_gmmumd_dll")
if(UNIX)
@@ -293,25 +293,22 @@ if(NOT GMMUMD_LIB_NAME)
set(IGDRCL__GMM_INCLUDE_DIR ${IGDRCL__GMM_INCLUDE_DIRS})
set(UMKM_SHAREDDATA_INCLUDE_PATHS "${IGDRCL__GMM_INCLUDE_DIR}")
message(STATUS "GmmLib include dirs: ${IGDRCL__GMM_INCLUDE_DIR}")
endif()
endif()
if(IGDRCL__GMM_FOUND)
# do nothing
elseif(EXISTS "${GMM_SOURCE_DIR}/CMakeLists.txt")
message(STATUS "GmmLib source dir is: ${GMM_SOURCE_DIR}")
add_subdirectory("${GMM_SOURCE_DIR}" "${IGDRCL_BUILD_DIR}/gmmlib")
if(NOT GMMUMD_LIB_NAME)
set(GMMUMD_LIB_NAME "igfx_gmmumd_dll")
endif()
set(UMKM_SHAREDDATA_INCLUDE_PATHS $<TARGET_PROPERTY:${GMMUMD_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
if(UNIX)
set(IGDRCL__GMM_LIBRARY_PATH "$<TARGET_FILE_DIR:${GMMUMD_LIB_NAME}>")
else()
message(FATAL_ERROR "GmmLib not found!")
endif()
else()
message(FATAL_ERROR "GmmLib not found!")
if(EXISTS "${GMM_SOURCE_DIR}/CMakeLists.txt")
message(STATUS "GmmLib source dir is: ${GMM_SOURCE_DIR}")
add_subdirectory("${GMM_SOURCE_DIR}" "${IGDRCL_BUILD_DIR}/gmmlib")
if(NOT DEFINED GMMUMD_LIB_NAME)
set(GMMUMD_LIB_NAME "igfx_gmmumd_dll")
endif()
set(UMKM_SHAREDDATA_INCLUDE_PATHS $<TARGET_PROPERTY:${GMMUMD_LIB_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
else()
message(FATAL_ERROR "GmmLib not found!")
endif()
endif()
endif()
else()