Skip to content

Commit

Permalink
cmake: use pkgconfig to find libva
Browse files Browse the repository at this point in the history
If user does not set -DLIBVA_INSTALL_PATH, then attempt
to find it using pkgconfig.

Fixes intel#3

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
  • Loading branch information
uartie committed Dec 4, 2017
1 parent f766254 commit 778c4ce
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmrtlib/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,21 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/../agnostic/share)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../agnostic/hardware)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../linux/share)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../linux/hardware)

if(NOT "${LIBVA_INSTALL_PATH}" STREQUAL "")
include_directories(BEFORE ${LIBVA_INSTALL_PATH})
else()
include(FindPkgConfig)
if(NOT LIBVA_FOUND)
pkg_check_modules(LIBVA REQUIRED libva>=1.0.0)
endif()
if(NOT LIBVA_X11_FOUND)
pkg_check_modules(LIBVA_X11 REQUIRED libva-x11>=1.0.0)
endif()
if(LIBVA_FOUND AND LIBVA_X11_FOUND)
include_directories(BEFORE ${LIBVA_INCLUDE_DIRS})
include_directories(BEFORE ${LIBVA_X11_INCLUDE_DIRS})
endif()
endif()


Expand Down
6 changes: 6 additions & 0 deletions media_driver/cmake/linux/media_include_paths_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ include_directories(${BS_DIR_SKUWA}/linux)

if(NOT "${LIBVA_INSTALL_PATH}" STREQUAL "")
include_directories(BEFORE ${LIBVA_INSTALL_PATH})
else()
include(FindPkgConfig)
pkg_check_modules(LIBVA REQUIRED libva>=1.0.0)
if(LIBVA_FOUND)
include_directories(BEFORE ${LIBVA_INCLUDE_DIRS})
endif()
endif()


Expand Down

0 comments on commit 778c4ce

Please sign in to comment.