blob: bd2a18718d3e50e063c3afda487e3f2b022c780b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
set(NVAPI_ROOT_DIR "" CACHE PATH "Path to an installed NVAPI SDK")
if(NVAPI_ROOT_DIR)
find_path(
NVAPI_INCLUDE_DIRS
NAMES nvapi.h
PATHS "${NVAPI_ROOT_DIR}"
NO_DEFAULT_PATH
)
else()
find_path(
NVAPI_INCLUDE_DIRS
NAMES nvapi.h
PATHS "${slang-SOURCE_DIR}/external/nvapi"
NO_DEFAULT_PATH
)
find_path(NVAPI_INCLUDE_DIRS NAMES nvapi.h)
# The nvapi.h header is in the root, so we can populate that easily
set(NVAPI_ROOT_DIR ${NVAPI_INCLUDE_DIRS})
endif()
# x86_64 only so far
find_library(
NVAPI_LIBRARIES
NAMES nvapi64
PATH_SUFFIXES amd64
PATHS ${NVAPI_ROOT_DIR}
)
find_package_handle_standard_args(
NVAPI
REQUIRED_VARS NVAPI_INCLUDE_DIRS NVAPI_LIBRARIES
)
|