mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 01:09:34 +00:00
Fixed: Windows SDK detection for some previous versions
This commit is contained in:
parent
185709734d
commit
f6ddcacd56
1 changed files with 5 additions and 3 deletions
|
@ -63,8 +63,10 @@ ENDIF(TARGET_ARM)
|
|||
GET_FILENAME_COMPONENT(WINSDKCURRENT_VERSION_REGISTRY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentVersion]" NAME)
|
||||
|
||||
IF(WINSDKCURRENT_VERSION_REGISTRY AND NOT WINSDKCURRENT_VERSION_REGISTRY STREQUAL "/registry")
|
||||
# For previous Windows SDK, version used the short version prefixed by a "v"
|
||||
STRING(REPLACE "v" "" WINSDKCURRENT_VERSION_REGISTRY ${WINSDKCURRENT_VERSION_REGISTRY})
|
||||
IF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
# MESSAGE(STATUS "Current version is ${WINSDKCURRENT_VERSION_REGISTRY}")
|
||||
MESSAGE(STATUS "Current version in registry is ${WINSDKCURRENT_VERSION_REGISTRY}")
|
||||
ENDIF(NOT WindowsSDK_FIND_QUIETLY)
|
||||
ENDIF(WINSDKCURRENT_VERSION_REGISTRY AND NOT WINSDKCURRENT_VERSION_REGISTRY STREQUAL "/registry")
|
||||
|
||||
|
@ -210,12 +212,12 @@ MACRO(USE_CURRENT_WINSDK)
|
|||
|
||||
# Look for correct registered Windows SDK version
|
||||
FOREACH(_VERSION ${WINSDK_DETECTED_VERSIONS})
|
||||
IF(WINSDKCURRENT_VERSION_REGISTRY STREQUAL WINSDK${_VERSION}_VERSION_FULL)
|
||||
IF(WINSDKCURRENT_VERSION_REGISTRY STREQUAL WINSDK${_VERSION}_VERSION_FULL OR WINSDKCURRENT_VERSION_REGISTRY STREQUAL _VERSION)
|
||||
SET(WINSDK_VERSION ${_VERSION})
|
||||
SET(WINSDK_VERSION_FULL "${WINSDK${WINSDK_VERSION}_VERSION_FULL}")
|
||||
SET(WINSDK_DIR "${WINSDK${WINSDK_VERSION}_DIR}")
|
||||
BREAK()
|
||||
ENDIF(WINSDKCURRENT_VERSION_REGISTRY STREQUAL WINSDK${_VERSION}_VERSION_FULL)
|
||||
ENDIF(WINSDKCURRENT_VERSION_REGISTRY STREQUAL WINSDK${_VERSION}_VERSION_FULL OR WINSDKCURRENT_VERSION_REGISTRY STREQUAL _VERSION)
|
||||
ENDFOREACH(_VERSION)
|
||||
ENDIF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_REGISTRY)
|
||||
ENDMACRO(USE_CURRENT_WINSDK)
|
||||
|
|
Loading…
Reference in a new issue