forked from leapmotion/cmake-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindInf2Cat.cmake
More file actions
28 lines (21 loc) · 807 Bytes
/
FindInf2Cat.cmake
File metadata and controls
28 lines (21 loc) · 807 Bytes
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
# - Try to find Inf2Cat
# Once done this will define
# Inf2Cat_FOUND - System has Inf2Cat
# Inf2Cat_BIN - The path to Inf2Cat
set(wdkregpath80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot]")
get_filename_component(wdkpath80 ${wdkregpath80} ABSOLUTE)
set(wdkregpath81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot81]")
get_filename_component(wdkpath81 ${wdkregpath81} ABSOLUTE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(WDK_ARCH "x64")
else()
set(WDK_ARCH "x86")
endif()
# Directly locate inf2cat:
find_program(
Inf2Cat_BIN Inf2Cat
PATHS ${wdkpath81} ${wdkpath80} ${WDK_ROOT_ALTERNATE}
PATH_SUFFIXES bin/${WDK_ARCH}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Inf2Cat DEFAULT_MSG Inf2Cat_BIN)