1# - FindPCIAccess
2#
3# Copyright 2015 Valve Corporation
4
5find_package(PkgConfig)
6
7pkg_check_modules(PC_PCIACCESS QUIET pciaccess)
8
9find_path(PCIACCESS_INCLUDE_DIR NAMES pciaccess.h
10    HINTS
11    ${PC_PCIACCESS_INCLUDEDIR}
12    ${PC_PCIACCESS_INCLUDE_DIRS}
13    )
14
15find_library(PCIACCESS_LIBRARY NAMES pciaccess
16    HINTS
17    ${PC_PCIACCESS_LIBDIR}
18    ${PC_PCIACCESS_LIBRARY_DIRS}
19    )
20
21include(FindPackageHandleStandardArgs)
22find_package_handle_standard_args(PCIAccess DEFAULT_MSG
23    PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY)
24
25mark_as_advanced(PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY)
26
27set(PCIACCESS_INCLUDE_DIRS ${PCIACCESS_INCLUDE_DIR})
28set(PCIACCESS_LIBRARIES ${PCIACCESS_LIBRARY})
29