mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-24 07:46:20 +00:00
Fix bug cannot find right include folder for winsdk8
This commit is contained in:
parent
faa93e50fa
commit
091cfb4580
1 changed files with 12 additions and 9 deletions
|
@ -71,11 +71,14 @@ SET(WINSDKENV_DIR $ENV{WINSDK_DIR})
|
||||||
MACRO(FIND_WINSDK_VERSION_HEADERS)
|
MACRO(FIND_WINSDK_VERSION_HEADERS)
|
||||||
IF(WINSDK_DIR AND NOT WINSDK_VERSION)
|
IF(WINSDK_DIR AND NOT WINSDK_VERSION)
|
||||||
# Search version in headers
|
# Search version in headers
|
||||||
IF(EXISTS ${WINSDK_DIR}/include/Msi.h)
|
FIND_FILE(_MSI_FILE Msi.h
|
||||||
SET(_MSI_FILE ${WINSDK_DIR}/include/Msi.h)
|
PATHS
|
||||||
ENDIF(EXISTS ${WINSDK_DIR}/include/Msi.h)
|
${WINSDK_DIR}/Include/um
|
||||||
|
${WINSDK_DIR}/Include
|
||||||
|
)
|
||||||
|
|
||||||
IF(_MSI_FILE)
|
IF(_MSI_FILE)
|
||||||
|
|
||||||
# Look for Windows SDK 8.0
|
# Look for Windows SDK 8.0
|
||||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8")
|
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8")
|
||||||
|
|
||||||
|
@ -88,11 +91,11 @@ MACRO(FIND_WINSDK_VERSION_HEADERS)
|
||||||
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7")
|
FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7")
|
||||||
|
|
||||||
IF(_CONTENT)
|
IF(_CONTENT)
|
||||||
IF(EXISTS ${WINSDK_DIR}/include/winsdkver.h)
|
FIND_FILE(_WINSDKVER_FILE winsdkver.h WinSDKVer.h
|
||||||
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/winsdkver.h)
|
PATHS
|
||||||
ELSEIF(EXISTS ${WINSDK_DIR}/include/WinSDKVer.h)
|
${WINSDK_DIR}/Include/um
|
||||||
SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/WinSDKVer.h)
|
${WINSDK_DIR}/Include
|
||||||
ENDIF(EXISTS ${WINSDK_DIR}/include/winsdkver.h)
|
)
|
||||||
|
|
||||||
IF(_WINSDKVER_FILE)
|
IF(_WINSDKVER_FILE)
|
||||||
# Load WinSDKVer.h content
|
# Load WinSDKVer.h content
|
||||||
|
@ -173,7 +176,7 @@ MACRO(USE_CURRENT_WINSDK)
|
||||||
|
|
||||||
# Look for Windows.h because there are several paths
|
# Look for Windows.h because there are several paths
|
||||||
IF(EXISTS ${_INCLUDE}/Windows.h)
|
IF(EXISTS ${_INCLUDE}/Windows.h)
|
||||||
STRING(REGEX REPLACE "/(include|INCLUDE|Include)" "" WINSDK_DIR ${_INCLUDE})
|
STRING(REGEX REPLACE "/(include|INCLUDE|Include)(.*)" "" WINSDK_DIR ${_INCLUDE})
|
||||||
MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}")
|
MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}")
|
||||||
BREAK()
|
BREAK()
|
||||||
ENDIF(EXISTS ${_INCLUDE}/Windows.h)
|
ENDIF(EXISTS ${_INCLUDE}/Windows.h)
|
||||||
|
|
Loading…
Reference in a new issue