|
@@ -1,13 +1,17 @@
|
|
# Find the win10 SDK path.
|
|
# Find the win10 SDK path.
|
|
-get_filename_component(WIN10_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]" ABSOLUTE CACHE)
|
|
|
|
-get_filename_component(TEMP_WIN10_SDK_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;ProductVersion]" ABSOLUTE CACHE)
|
|
|
|
-
|
|
|
|
-get_filename_component(WIN10_SDK_VERSION ${TEMP_WIN10_SDK_VERSION} NAME)
|
|
|
|
|
|
+if ("$ENV{WIN10_SDK_PATH}$ENV{WIN10_SDK_VERSION}" STREQUAL "" )
|
|
|
|
+ get_filename_component(WIN10_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]" ABSOLUTE CACHE)
|
|
|
|
+ get_filename_component(TEMP_WIN10_SDK_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;ProductVersion]" ABSOLUTE CACHE)
|
|
|
|
+ get_filename_component(WIN10_SDK_VERSION ${TEMP_WIN10_SDK_VERSION} NAME)
|
|
|
|
+elseif(TRUE)
|
|
|
|
+ set (WIN10_SDK_PATH $ENV{WIN10_SDK_PATH})
|
|
|
|
+ set (WIN10_SDK_VERSION $ENV{WIN10_SDK_VERSION})
|
|
|
|
+endif ("$ENV{WIN10_SDK_PATH}$ENV{WIN10_SDK_VERSION}" STREQUAL "" )
|
|
|
|
|
|
# WIN10_SDK_PATH will be something like C:\Program Files (x86)\Windows Kits\10
|
|
# WIN10_SDK_PATH will be something like C:\Program Files (x86)\Windows Kits\10
|
|
-
|
|
|
|
# WIN10_SDK_VERSION will be something like 10.0.14393 or 10.0.14393.0; we need the
|
|
# WIN10_SDK_VERSION will be something like 10.0.14393 or 10.0.14393.0; we need the
|
|
# one that matches the directory name.
|
|
# one that matches the directory name.
|
|
|
|
+
|
|
if (IS_DIRECTORY "${WIN10_SDK_PATH}/Include/${WIN10_SDK_VERSION}.0")
|
|
if (IS_DIRECTORY "${WIN10_SDK_PATH}/Include/${WIN10_SDK_VERSION}.0")
|
|
set(WIN10_SDK_VERSION "${WIN10_SDK_VERSION}.0")
|
|
set(WIN10_SDK_VERSION "${WIN10_SDK_VERSION}.0")
|
|
endif (IS_DIRECTORY "${WIN10_SDK_PATH}/Include/${WIN10_SDK_VERSION}.0")
|
|
endif (IS_DIRECTORY "${WIN10_SDK_PATH}/Include/${WIN10_SDK_VERSION}.0")
|