Fixed: Use of Windows SDK 7.1 with VC++ 2010 if found
This commit is contained in:
parent
573e117fd0
commit
7cecd57f1d
1 changed files with 20 additions and 5 deletions
|
@ -9,17 +9,32 @@ IF(WINSDK_INCLUDE_DIR)
|
||||||
SET(WINSDK_FIND_QUIETLY TRUE)
|
SET(WINSDK_FIND_QUIETLY TRUE)
|
||||||
ENDIF(WINSDK_INCLUDE_DIR)
|
ENDIF(WINSDK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
GET_FILENAME_COMPONENT(WINSDK71_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1;InstallationFolder]" ABSOLUTE CACHE)
|
||||||
|
GET_FILENAME_COMPONENT(WINSDK71_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1;ProductVersion]" NAME)
|
||||||
|
|
||||||
|
IF(WINSDK71_DIR)
|
||||||
|
IF(NOT WINSDK_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found Windows SDK ${WINSDK71_VERSION} in ${WINSDK71_DIR}")
|
||||||
|
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
||||||
|
ENDIF(WINSDK71_DIR)
|
||||||
|
|
||||||
|
GET_FILENAME_COMPONENT(WINSDKCURRENT_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
|
||||||
|
GET_FILENAME_COMPONENT(WINSDKCURRENT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentVersion]" NAME)
|
||||||
|
|
||||||
|
IF(WINSDKCURRENT_DIR)
|
||||||
|
IF(NOT WINSDK_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found Windows SDK ${WINSDKCURRENT_VERSION} in ${WINSDKCURRENT_DIR}")
|
||||||
|
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
||||||
|
ENDIF(WINSDKCURRENT_DIR)
|
||||||
|
|
||||||
FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
|
FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
|
||||||
PATHS
|
PATHS
|
||||||
"[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/Include"
|
${WINSDK71_DIR}/Include
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/Include"
|
${WINSDKCURRENT_DIR}/Include
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(WINSDK_INCLUDE_DIR)
|
IF(WINSDK_INCLUDE_DIR)
|
||||||
SET(WINSDK_FOUND TRUE)
|
SET(WINSDK_FOUND TRUE)
|
||||||
IF(NOT WINSDK_FIND_QUIETLY)
|
|
||||||
MESSAGE(STATUS "Found Windows SDK.")
|
|
||||||
ENDIF(NOT WINSDK_FIND_QUIETLY)
|
|
||||||
ELSE(WINSDK_INCLUDE_DIR)
|
ELSE(WINSDK_INCLUDE_DIR)
|
||||||
IF(NOT WINSDK_FIND_QUIETLY)
|
IF(NOT WINSDK_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Windows SDK!")
|
MESSAGE(STATUS "Warning: Unable to find Windows SDK!")
|
||||||
|
|
Loading…
Reference in a new issue